Skip to content

Commit b958e7e

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 7c24925 commit b958e7e

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
@@ -286,6 +286,7 @@ commands:
286286
ln -s ~/lib/tinygo/bin/tinygo /go/bin/tinygo
287287
tinygo version
288288
- run: make smoketest
289+
- run: make tinygo-test-all
289290
build-macos:
290291
steps:
291292
- checkout

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,19 @@ TEST_PACKAGES = \
221221
# TODO: parallelize, and only show failing tests (no implied -v flag).
222222
.PHONY: tinygo-test
223223
tinygo-test:
224-
$(TINYGO) test $(TEST_PACKAGES)
224+
GOARCH=amd64 $(TINYGO) test $(TEST_PACKAGES)
225+
226+
# Test all architectures (not just the host architecture).
227+
.PHONY: tinygo-test-all tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
228+
tinygo-test-all: tinygo-test tinygo-test-386 tinygo-test-arm tinygo-test-arm64 tinygo-test-wasi
229+
tinygo-test-386:
230+
GOARCH=386 $(TINYGO) test $(TEST_PACKAGES)
231+
tinygo-test-arm:
232+
GOARCH=arm $(TINYGO) test $(TEST_PACKAGES)
233+
tinygo-test-arm64:
234+
GOARCH=arm64 $(TINYGO) test $(TEST_PACKAGES)
235+
tinygo-test-wasi:
236+
$(TINYGO) test -target=wasi $(TEST_PACKAGES)
225237

226238
.PHONY: smoketest
227239
smoketest:

0 commit comments

Comments
 (0)