Skip to content

Commit 2bf5de7

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 5e5ce98 commit 2bf5de7

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
@@ -210,10 +210,22 @@ TEST_PACKAGES = \
210210
# TODO: parallelize, and only show failing tests (no implied -v flag).
211211
.PHONY: tinygo-test
212212
tinygo-test:
213-
$(TINYGO) test $(TEST_PACKAGES)
213+
GOARCH=amd64 $(TINYGO) test $(TEST_PACKAGES)
214214
# until "test testing" passes
215215
cd tests/tinygotest && $(TINYGO) test benchmark_test.go
216216

217+
# Test all architectures (not just the host architecture).
218+
.PHONY: tinygo-test-all tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
219+
tinygo-test-all: tinygo-test tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
220+
tinygo-test-386:
221+
GOARCH=386 $(TINYGO) test $(TEST_PACKAGES)
222+
tinygo-test-arm:
223+
GOARCH=arm $(TINYGO) test $(TEST_PACKAGES)
224+
tinygo-test-arm64:
225+
GOARCH=arm64 $(TINYGO) test $(TEST_PACKAGES)
226+
tinygo-test-wasi:
227+
$(TINYGO) test -target=wasi $(TEST_PACKAGES)
228+
217229
.PHONY: smoketest
218230
smoketest:
219231
$(TINYGO) version

0 commit comments

Comments
 (0)