Skip to content

Build toolchains for aarch64 #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/toolchain_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ 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: Toolchains targeting Ibex with bit-manipulation extensions
target: riscv32-unknown-elf
Expand All @@ -41,10 +47,10 @@ jobs:
# target: riscv64-unknown-linux-gnu
# output_dir: /opt/riscv-linux-toolchain

name: ${{ matrix.display_name }}
runs-on: ubuntu-latest
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_x86_64
container: quay.io/pypa/manylinux_2_28_${{ matrix.host_arch }}
timeout-minutes: 360

steps:
Expand All @@ -64,6 +70,10 @@ jobs:
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::
Expand Down Expand Up @@ -95,7 +105,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}-toolchains
name: ${{ matrix.name }}-${{ matrix.host_arch }}-toolchains
path: ${{ env.ARTIFACT_STAGING_DIR }}

- name: Check tarballs
Expand All @@ -117,5 +127,5 @@ jobs:
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 }}-${RELEASE_TAG}.tar.xz" \
"${ARTIFACT_STAGING_DIR}/lowrisc-toolchain-gcc-${{ matrix.name }}-${RELEASE_TAG}.tar.xz"
"${ARTIFACT_STAGING_DIR}/lowrisc-toolchain-${{ matrix.name }}-${HOST_ARCH}-${RELEASE_TAG}.tar.xz" \
"${ARTIFACT_STAGING_DIR}/lowrisc-toolchain-gcc-${{ matrix.name }}-${HOST_ARCH}-${RELEASE_TAG}.tar.xz"
3 changes: 2 additions & 1 deletion build-clang-with-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ build_top_dir="${PWD}"
source "${build_top_dir}/sw-versions.sh"

tag_name="${RELEASE_TAG:-HEAD}"
toolchain_full_name="${toolchain_name}-${tag_name}"
host_arch="${HOST_ARCH:-x86_64}"
toolchain_full_name="${toolchain_name}-${host_arch}-${tag_name}"

mkdir -p "${build_top_dir}/build"
cd "${build_top_dir}/build"
Expand Down
3 changes: 2 additions & 1 deletion build-gcc-with-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ build_top_dir="${PWD}"
source "${build_top_dir}/sw-versions.sh"

tag_name="${RELEASE_TAG:-HEAD}"
toolchain_full_name="${toolchain_name}-${tag_name}"
host_arch="${HOST_ARCH:-x86_64}"
toolchain_full_name="${toolchain_name}-${host_arch}-${tag_name}"

# crosstools-NG needs the ability to create and chmod the
# $toolchain_dest directory.
Expand Down