Skip to content

Commit c798524

Browse files
committed
ci: run stdlib tests for other architectures
Currently this runs the tests for amd64, 386, arm, arm64, and wasi. I tried adding wasm and a baremetal target (such as riscv-qemu) but they don't pass the tests yet and should be fixed in the future. At least this change should make sure that existing tests continue to pass on a variety of architectures.
1 parent 4f7b23c commit c798524

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ commands:
196196
- /go/pkg/mod
197197
- run: make gen-device -j4
198198
- run: make smoketest TINYGO=build/tinygo
199+
- run: make tinygo-test-all
199200
build-linux:
200201
steps:
201202
- checkout

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,22 @@ TEST_PACKAGES = \
206206
# TODO: parallelize, and only show failing tests (no implied -v flag).
207207
.PHONY: tinygo-test
208208
tinygo-test:
209-
$(TINYGO) test $(TEST_PACKAGES)
209+
GOARCH=amd64 $(TINYGO) test $(TEST_PACKAGES)
210210
# until "test testing" passes
211211
cd tests/tinygotest && $(TINYGO) test benchmark_test.go
212212

213+
# Test all architectures (not just the host architecture).
214+
.PHONY: tinygo-test-all tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
215+
tinygo-test-all: tinygo-test tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
216+
tinygo-test-386:
217+
GOARCH=386 $(TINYGO) test $(TEST_PACKAGES)
218+
tinygo-test-arm:
219+
GOARCH=arm $(TINYGO) test $(TEST_PACKAGES)
220+
tinygo-test-arm64:
221+
GOARCH=arm64 $(TINYGO) test $(TEST_PACKAGES)
222+
tinygo-test-wasi:
223+
$(TINYGO) test -target=wasi $(TEST_PACKAGES)
224+
213225
.PHONY: smoketest
214226
smoketest:
215227
$(TINYGO) version

0 commit comments

Comments
 (0)