Skip to content

Commit 4231c48

Browse files
authored
CI: use Linux ARM runners. (#2366)
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
1 parent 6fd2ceb commit 4231c48

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/commit.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,22 @@ jobs:
106106
run: bash <(curl -s https://codecov.io/bash)
107107

108108
test_scratch:
109-
name: ${{ matrix.arch }}, Linux (scratch), Go-${{ matrix.go-version }}
110-
runs-on: ubuntu-22.04
109+
name: ${{ matrix.platform.arch }}, Linux (scratch), Go-${{ matrix.go-version }}
110+
runs-on: ${{ matrix.platform.os }}
111111
strategy:
112112
fail-fast: false # don't fail fast as sometimes failures are arch/OS specific
113113
matrix: # Use versions consistent with wazero's Go support policy.
114114
go-version:
115115
- "1.23" # Current Go version
116116
- "1.21" # Floor Go version of wazero (current - 2)
117-
arch:
118-
- "amd64"
119-
- "arm64"
120-
- "riscv64"
117+
platform:
118+
- os: ubuntu-22.04
119+
arch: amd64
120+
- os: ubuntu-22.04-arm
121+
arch: arm64
122+
- os: ubuntu-22.04
123+
arch: riscv64
124+
qemu: true
121125

122126
steps:
123127

@@ -132,11 +136,11 @@ jobs:
132136
go list -f '{{.Dir}}' ./... | egrep -v 'spectest' | xargs -Ipkg go test pkg -c -o pkg.test
133137
go build -o wazerocli ./cmd/wazero
134138
env:
135-
GOARCH: ${{ matrix.arch }}
139+
GOARCH: ${{ matrix.platform.arch }}
136140
CGO_ENABLED: 0
137141

138142
- name: Set up QEMU
139-
if: ${{ matrix.arch != 'amd64' }}
143+
if: ${{ matrix.platform.qemu }}
140144
uses: docker/setup-qemu-action@v3
141145
with: # Avoid docker.io rate-limits; built with internal-images.yml
142146
image: ghcr.io/tetratelabs/wazero/internal-binfmt
@@ -146,11 +150,11 @@ jobs:
146150
run: |
147151
echo 'FROM scratch' >> Dockerfile
148152
echo 'CMD ["/test"]' >> Dockerfile
149-
docker buildx build -t wazero:test --platform linux/${{ matrix.arch }} .
153+
docker buildx build -t wazero:test --platform linux/${{ matrix.platform.arch }} .
150154
151155
- name: Run built test binaries
152156
# This runs all tests compiled above in sequence. Note: This mounts /tmp to allow t.TempDir() in tests.
153-
run: find . -name "*.test" | xargs -Itestbin docker run --platform linux/${{ matrix.arch }} -v $(pwd)/testbin:/test -v $(pwd)/wazerocli:/wazero -e WAZEROCLI=/wazero --tmpfs /tmp --rm -t wazero:test
157+
run: find . -name "*.test" | xargs -Itestbin docker run --platform linux/${{ matrix.platform.arch }} -v $(pwd)/testbin:/test -v $(pwd)/wazerocli:/wazero -e WAZEROCLI=/wazero --tmpfs /tmp --rm -t wazero:test
154158

155159
test_bsd:
156160
name: amd64, ${{ matrix.os.name }}

0 commit comments

Comments
 (0)