Browse Source

add Makefile target to test examples

bidhan-a 1 month ago
parent
commit
4254b64f6e
1 changed files with 11 additions and 0 deletions
  1. 11 0
      Makefile

+ 11 - 0
Makefile

@@ -9,3 +9,14 @@ bundler:
 web:
 	wasm-pack build crates/assembler --release --no-pack --out-dir ../../dist/web --target web
 	rm dist/web/.gitignore
+
+.PHONY: test-examples
+test-examples:
+	@set -e; \
+	for d in examples/*; do \
+		if [ -d "$$d" ]; then \
+			echo "=== Building and testing $$d ==="; \
+			( cd "$$d" && sbpf build || exit 1 ); \
+			( cd "$$d" && sbpf test || exit 1 ); \
+		fi; \
+	done