From b0793fbcd79f19c4080f87416e93d2ff4efe69b3 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Wed, 18 Dec 2024 13:11:53 +0100 Subject: [PATCH] make: add makefile with some build/smoketest tasks Signed-off-by: deadprogram --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cf82012 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ + +clean: + @rm -rf build + +FMT_PATHS = ./ + +fmt-check: + @unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1 + +smoke-test: + @mkdir -p build + tinygo build -target pico-w -size short -o build/test.uf2 ./rp2-pio/examples/blinky + tinygo build -target pico-w -size short -o build/test.uf2 ./rp2-pio/examples/i2s + tinygo build -target pico-w -size short -o build/test.uf2 ./rp2-pio/examples/pulsar + tinygo build -target pico-w -size short -o build/test.uf2 ./rp2-pio/examples/tufty + tinygo build -target pico-w -size short -o build/test.uf2 ./rp2-pio/examples/ws2812b + +test: clean fmt-check smoke-test