Add AArch64 support #39
Workflow file for this run
This file contains 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 bootstrap binaries for glibc on Linux | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/build.yml | |
- "build-*.sh" | |
- Dockerfile* | |
workflow_call: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
binary: | |
- binutils | |
- bison | |
- gawk | |
- gcc | |
- make | |
- python3 | |
- sed | |
include: | |
- arch: x86_64 | |
runs-on: ubuntu-latest | |
# TODO: add aarch64 when available | |
runs-on: ${{matrix.runs-on}} | |
name: ${{matrix.binary}} (${{matrix.arch}}) | |
env: | |
ARCH: ${{matrix.arch}} | |
BINARY: ${{matrix.binary}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: docker build --tag glibc-bootstrap --file "Dockerfile.$ARCH" . | |
- name: Run Docker container | |
run: docker run --rm --detach --user linuxbrew --name "$GITHUB_SHA" --workdir /home/linuxbrew --volume "$(pwd)":/home/linuxbrew/glibc-bootstrap glibc-bootstrap sleep inf | |
- name: Build ${{matrix.binary}} | |
run: docker exec "$GITHUB_SHA" /bin/bash -c "/home/linuxbrew/glibc-bootstrap/build-$BINARY.sh" | |
- name: Copy binaries from container | |
run: docker cp "$GITHUB_SHA":/home/linuxbrew/bootstrap-binaries . | |
- name: Upload binaries to GitHub Actions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bootstrap-${{matrix.arch}}-${{matrix.binary}} | |
path: bootstrap-binaries |