@@ -106,18 +106,22 @@ jobs:
106
106
run : bash <(curl -s https://codecov.io/bash)
107
107
108
108
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 }}
111
111
strategy :
112
112
fail-fast : false # don't fail fast as sometimes failures are arch/OS specific
113
113
matrix : # Use versions consistent with wazero's Go support policy.
114
114
go-version :
115
115
- " 1.23" # Current Go version
116
116
- " 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
121
125
122
126
steps :
123
127
@@ -132,11 +136,11 @@ jobs:
132
136
go list -f '{{.Dir}}' ./... | egrep -v 'spectest' | xargs -Ipkg go test pkg -c -o pkg.test
133
137
go build -o wazerocli ./cmd/wazero
134
138
env :
135
- GOARCH : ${{ matrix.arch }}
139
+ GOARCH : ${{ matrix.platform. arch }}
136
140
CGO_ENABLED : 0
137
141
138
142
- name : Set up QEMU
139
- if : ${{ matrix.arch != 'amd64' }}
143
+ if : ${{ matrix.platform.qemu }}
140
144
uses : docker/setup-qemu-action@v3
141
145
with : # Avoid docker.io rate-limits; built with internal-images.yml
142
146
image : ghcr.io/tetratelabs/wazero/internal-binfmt
@@ -146,11 +150,11 @@ jobs:
146
150
run : |
147
151
echo 'FROM scratch' >> Dockerfile
148
152
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 }} .
150
154
151
155
- name : Run built test binaries
152
156
# 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
154
158
155
159
test_bsd :
156
160
name : amd64, ${{ matrix.os.name }}
0 commit comments