This directory contains GitHub Actions workflows for automating the build and release of mlibc and its GCC toolchains.
release.yml)Purpose: Automatically creates source code releases for mlibc.
Triggers:
v1.0.0)What it does:
Manual trigger:
# Via GitHub UI: Actions -> Release mlibc Source -> Run workflow
# Or use GitHub CLI:
gh workflow run release.yml -f version=v1.0.0
build-toolchain.yml)Purpose: Builds GCC toolchains with mlibc for multiple architectures.
Triggers:
v1.0.0)What it does:
Supported architectures:
arm - ARM Linux EABI (arm-linux-eabi)riscv32 - RISC-V 32-bit (riscv32-unknown-elf)riscv64 - RISC-V 64-bit (riscv64-unknown-elf)aarch64 - ARM 64-bit (aarch64-linux-gnu)Manual trigger:
# Build all architectures
gh workflow run build-toolchain.yml
# Build specific architectures
gh workflow run build-toolchain.yml -f architectures=arm,riscv64
Build time: Each architecture takes approximately 1-2 hours to build.
build-single-toolchain.yml)Purpose: Quickly build a single toolchain for testing or development.
Triggers:
What it does:
Manual trigger:
# Via GitHub UI: Actions -> Build Single Toolchain -> Run workflow
# Select architecture: arm, riscv32, riscv64, or aarch64
# Or use GitHub CLI:
gh workflow run build-single-toolchain.yml -f arch=arm -f upload_artifact=true
Use cases:
To create a new release with source code and toolchains:
Tag the release:
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
Automatic builds:
release.yml workflow will create a source releasebuild-toolchain.yml workflow will build all toolchains (takes 2-4 hours)Download artifacts:
If you prefer to create releases manually:
Build toolchains:
gh workflow run build-toolchain.yml -f version=v1.0.0
Create source release:
gh workflow run release.yml -f version=v1.0.0
Download artifacts from the workflow runs and manually attach to release
The workflows set the following environment variables during builds:
CI_COMMIT_SHA: Git commit hashCI_JOB_ID: GitHub run IDCI_PIPELINE_ID: GitHub run numberThese are embedded in the built toolchains for traceability.
The workflows install the following dependencies:
To test builds locally before running workflows:
cd toolchain
make arch=arm abi=linux-eabi
See toolchain/README.md for detailed local build instructions.
To update toolchain component versions:
Edit toolchain/Makefile:
BINUTILS_VERGCC_VERGMP_VER, MPC_VER, MPFR_VERTest locally first
Update patches in toolchain/patches/ if needed
To add support for a new architecture:
toolchain/Makefilebuild-single-toolchain.ymlbuild-toolchain.yml