Skip to content

Commit 929635a

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 04f5200 commit 929635a

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
@@ -279,6 +279,7 @@ commands:
279279
ln -s ~/lib/tinygo/bin/tinygo /go/bin/tinygo
280280
tinygo version
281281
- run: make smoketest
282+
- run: make tinygo-test-all
282283
build-macos:
283284
steps:
284285
- checkout

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,19 @@ TEST_PACKAGES = \
211211
# TODO: parallelize, and only show failing tests (no implied -v flag).
212212
.PHONY: tinygo-test
213213
tinygo-test:
214-
$(TINYGO) test $(TEST_PACKAGES)
214+
GOARCH=amd64 $(TINYGO) test $(TEST_PACKAGES)
215+
216+
# Test all architectures (not just the host architecture).
217+
.PHONY: tinygo-test-all tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
218+
tinygo-test-all: tinygo-test tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
219+
tinygo-test-386:
220+
GOARCH=386 $(TINYGO) test $(TEST_PACKAGES)
221+
tinygo-test-arm:
222+
GOARCH=arm $(TINYGO) test $(TEST_PACKAGES)
223+
tinygo-test-arm64:
224+
GOARCH=arm64 $(TINYGO) test $(TEST_PACKAGES)
225+
tinygo-test-wasi:
226+
$(TINYGO) test -target=wasi $(TEST_PACKAGES)
215227

216228
.PHONY: smoketest
217229
smoketest:

0 commit comments

Comments
 (0)