Skip to content

Commit 534f871

Browse files
authored
Merge pull request #1 from toitlang/floitsch/matrix
Upload matrix of sysroots as build artifacts
2 parents 3a66569 + bb4d061 commit 534f871

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ on:
88

99
jobs:
1010
build:
11+
name: Build sysroot for ${{ matrix.arch }}
1112
runs-on: ubuntu-latest
1213

14+
strategy:
15+
matrix:
16+
arch: [armv7, aarch64, riscv64, s390x, ppc64le]
17+
1318
steps:
1419
- uses: uraimo/run-on-arch-action@v2
1520
name: Run commands
1621
id: runcmd
1722
with:
18-
arch: aarch64
23+
arch: ${{ matrix.arch }}
1924
distro: ubuntu20.04
2025

2126
# Not required, but speeds up builds by storing container images in
@@ -29,11 +34,10 @@ jobs:
2934
dockerRunArgs: |
3035
--volume "${PWD}/artifacts:/artifacts"
3136
32-
shell: /bin/bash
33-
3437
install: |
3538
apt-get update -q -y
3639
apt-get install -q -y --no-install-recommends \
40+
clang \
3741
build-essential \
3842
ca-certificates \
3943
curl \
@@ -49,12 +53,14 @@ jobs:
4953
wget \
5054
zip
5155
52-
# Set an output parameter `uname` for use in subsequent steps
56+
shell: /bin/bash
57+
5358
run: |
5459
cd /
55-
tar c -zf /artifacts/sysroot.tar.gz bin lib include usr/bin usr/lib usr/include
60+
shopt -s extglob
61+
tar c -zf /artifacts/sysroot-${{ matrix.arch }}.tar.gz *(bin|lib|include) usr/*(bin|lib|include) usr/local/*(bin|lib|include)
5662
5763
- uses: actions/upload-artifact@v3
5864
with:
5965
name: sysroot
60-
path: /artifacts/sysroot.tar.gz
66+
path: artifacts/sysroot-${{ matrix.arch }}.tar.gz

0 commit comments

Comments
 (0)