Skip to content

Commit 222a405

Browse files
committed
feat: multiple arch support
1 parent cab41ee commit 222a405

File tree

1 file changed

+34
-17
lines changed

1 file changed

+34
-17
lines changed

.github/workflows/musltest.yml

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,47 @@ env:
1414
jobs:
1515
musl:
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
include:
20+
- arch: x86
21+
goarch: 386
22+
- arch: aarch64
23+
goarch: arm64
24+
- arch: amd64
25+
goarch: amd64
26+
- arch: armv7
27+
goarch: arm
28+
- arch: ppc64le
29+
goarch: ppc64le
30+
- arch: s390x
31+
goarch: s390x
32+
- arch: riscv64
33+
goarch: riscv64
1734
steps:
1835
- uses: actions/checkout@v2
19-
2036
- name: Setup latest Alpine Linux
2137
uses: jirutka/setup-alpine@v1
22-
23-
- name: Run script inside Alpine chroot as root
24-
run: |
25-
cat /etc/alpine-release
26-
apk add linux-headers
27-
apk add python3-dev
28-
apk add go
29-
apk add python3
30-
apk add uv
31-
apk add musl
32-
apk add musl-dev
33-
apk add musl-utils
34-
apk add git
35-
apk add gcc
36-
shell: alpine.sh --root {0}
38+
with:
39+
alpine-version: 'latest'
40+
arch: ${{ matrix.arch }}
41+
chroot: true
42+
packages: |
43+
linux-headers
44+
python3-dev
45+
go
46+
python3
47+
uv
48+
musl
49+
musl-dev
50+
musl-utils
51+
git
52+
gcc
3753
3854
- name: Run script inside Alpine chroot as the default user (unprivileged)
3955
run: |
4056
export CGO_ENABLED=1
57+
export GOARCH=${{ matrix.goarch }}
4158
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
4259
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
4360
ls -la # as you would expect, you're in your workspace directory
@@ -48,7 +65,7 @@ jobs:
4865
uv build
4966
uv run task repack
5067
export UV_PUBLISH_TOKEN=${UV_PUBLISH_TOKEN}
51-
uv publish
68+
# uv publish
5269
shell: alpine.sh {0}
5370
- name: Run script on the host system (Ubuntu)
5471
run: |

0 commit comments

Comments
 (0)