Update Binutils to 2.44 #135
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build toolchains | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| ARTIFACT_STAGING_DIR: artifact | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| name: [rv32imcb, rv64imac] | |
| os: [ubuntu-latest, ubuntu-24.04-arm] | |
| include: | |
| - os: ubuntu-latest | |
| host_arch: x86_64 | |
| - os: ubuntu-24.04-arm | |
| host_arch: aarch64 | |
| - name: rv32imcb | |
| display_name: RV32IMCB toolchains (Ibex) | |
| target: riscv32-unknown-elf | |
| march: rv32imc_zba_zbb_zbc_zbs | |
| mabi: ilp32 | |
| mcmodel: medany | |
| - name: rv64imac | |
| display_name: RV64IMAC toolchains (Muntjac) | |
| target: riscv64-unknown-elf | |
| march: rv64imac | |
| mabi: lp64 | |
| mcmodel: medany | |
| name: ${{ matrix.host_arch }} build of ${{ matrix.display_name }} | |
| runs-on: ${{ matrix.os }} | |
| # This is an AlmaLinux 8 based image | |
| container: quay.io/pypa/manylinux_2_28_${{ matrix.host_arch }} | |
| timeout-minutes: 360 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup environment | |
| run: | | |
| echo ::group::Install dependencies | |
| ./prepare-host.sh | |
| echo ::endgroup:: | |
| echo Preparing toolchain destination directory... | |
| sudo mkdir -p /tools/riscv | |
| sudo chmod 0777 /tools/riscv | |
| echo ::group::Set the host architecture env var | |
| echo "HOST_ARCH=${{ matrix.host_arch }}" >> "$GITHUB_ENV" | |
| echo ::endgroup:: | |
| echo ::group::Set the release tag env var | |
| echo "RELEASE_TAG=$(./release_tag.sh)" >> "$GITHUB_ENV" | |
| echo ::endgroup:: | |
| echo Creating artifact staging directory... | |
| mkdir "$ARTIFACT_STAGING_DIR" | |
| # Git warns about this repo having dubious ownership - ignore. | |
| git config --global --add safe.directory "$(pwd)" | |
| - name: Build Binutils | |
| run: | | |
| ./build-binutils.sh "${{ matrix.target }}" | |
| - name: Build Clang toolchain | |
| run: | | |
| ./build-clang-with-args.sh \ | |
| --name "lowrisc-toolchain-${{ matrix.name }}" \ | |
| --target "${{ matrix.target }}" \ | |
| --march "${{ matrix.march }}" \ | |
| --mabi "${{ matrix.mabi}}" \ | |
| --mcmodel "${{ matrix.mcmodel }}" | |
| - name: Package toolchains | |
| run: | | |
| ./create-prefixed-archive.sh \ | |
| "lowrisc-toolchain-${{ matrix.name }}-${HOST_ARCH}-${RELEASE_TAG}" \ | |
| "${ARTIFACT_STAGING_DIR}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }}-${{ matrix.host_arch }}-toolchains | |
| path: ${{ env.ARTIFACT_STAGING_DIR }} | |
| - name: Check tarballs | |
| run: | | |
| set -e | |
| for f in "${ARTIFACT_STAGING_DIR}"/*.tar.xz; do | |
| ./check-tarball.sh "$f" | |
| done | |
| - name: Release | |
| if: github.ref_type == 'tag' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| # Create the release if it doesn't already exist. | |
| gh release create "$RELEASE_TAG" --prerelease || echo "release exists" | |
| # Upload this job's artifacts. | |
| gh release upload "$RELEASE_TAG" --clobber \ | |
| "${ARTIFACT_STAGING_DIR}/lowrisc-toolchain-${{ matrix.name }}-${HOST_ARCH}-${RELEASE_TAG}.tar.xz" \ |