From dc876c6ed45b4c52dedca6b0c5a4bc3448f1bd64 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 7 Mar 2025 10:43:55 +0100 Subject: [PATCH] ci: add single test for wasm It looks like we didn't have any tests for wasm. Having one tests is not much, but it proves that the infrastructure works and it actually verifies a fix to https://github.com/tinygo-org/tinygo/issues/4777. We should add more packages to this list in the future. --- .github/workflows/linux.yml | 1 + GNUmakefile | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cbb0a7c55..a0a908635 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -165,6 +165,7 @@ jobs: ln -s ~/lib/tinygo/bin/tinygo ~/go/bin/tinygo - run: make tinygo-test-wasip1-fast - run: make tinygo-test-wasip2-fast + - run: make tinygo-test-wasm - run: make smoketest assert-test-linux: # Run all tests that can run on Linux, with LLVM assertions enabled to catch diff --git a/GNUmakefile b/GNUmakefile index 45bca5d8a..13481aab7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -407,6 +407,9 @@ TEST_PACKAGES_WINDOWS := \ text/template/parse \ $(nil) +TEST_PACKAGES_WASM := \ + crypto/sha256 + # Report platforms on which each standard library package is known to pass tests jointmp := $(shell echo /tmp/join.$$$$) report-stdlib-tests-pass: @@ -450,6 +453,8 @@ tinygo-bench-fast: $(TINYGO) test -bench . $(TEST_PACKAGES_HOST) # Same thing, except for wasi rather than the current platform. +tinygo-test-wasm: + $(TINYGO) test -target wasm $(TEST_PACKAGES_WASM) tinygo-test-wasi: $(TINYGO) test -target wasip1 $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi tinygo-test-wasip1: