-
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (48 loc) · 1.61 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
- arch: aarch64
runs-on: ubuntu-24.04-arm
runs-on: ${{matrix.runs-on}}
name: ${{matrix.binary}} (${{matrix.arch}})
env:
ARCH: ${{matrix.arch}}
BINARY: ${{matrix.binary}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- 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@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: bootstrap-${{matrix.arch}}-${{matrix.binary}}
path: bootstrap-binaries