aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-07-06 22:00:21 +0200
committerRon Evans <[email protected]>2019-07-07 14:03:24 +0200
commitf0eb4eef5a842be56288590ef3ba8766432c67ac (patch)
tree2183bbbef2467aecb4ce3e4e801d97eecbfcd94d
parentfa928e8cd34bd63db41d96dd28a686e283324ccf (diff)
downloadtinygo-f0eb4eef5a842be56288590ef3ba8766432c67ac.tar.gz
tinygo-f0eb4eef5a842be56288590ef3ba8766432c67ac.zip
ci: make smoketests more flexible
-rw-r--r--.circleci/config.yml12
-rw-r--r--Makefile11
2 files changed, 9 insertions, 14 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index fc6207307..4b0a054e6 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -52,12 +52,6 @@ commands:
key: llvm-source-8-v5
paths:
- llvm-project
- smoketest:
- steps:
- - run: make smoketest
- smoketest-no-avr:
- steps:
- - run: make smoketest-no-avr
test-linux:
steps:
- checkout
@@ -73,7 +67,7 @@ commands:
- run: go install .
- run: go test -v
- run: make gen-device -j4
- - smoketest
+ - run: make smoketest
- save_cache:
key: go-cache-{{ checksum "Gopkg.lock" }}-{{ .Environment.CIRCLE_BUILD_NUM }}
paths:
@@ -155,7 +149,7 @@ commands:
tar -C ~/lib -xf /tmp/tinygo.linux-amd64.tar.gz
ln -s ~/lib/tinygo/bin/tinygo /go/bin/tinygo
tinygo version
- - smoketest
+ - run: make smoketest
build-macos:
steps:
- checkout
@@ -215,7 +209,7 @@ commands:
tar -C /usr/local/opt -xf /tmp/tinygo.darwin-amd64.tar.gz
ln -s /usr/local/opt/tinygo/bin/tinygo /usr/local/bin/tinygo
tinygo version
- - smoketest-no-avr
+ - run: make smoketest AVR=0
jobs:
diff --git a/Makefile b/Makefile
index ae0afe1cc..d83b81202 100644
--- a/Makefile
+++ b/Makefile
@@ -87,11 +87,8 @@ test:
tinygo-test:
cd tests/tinygotest && tinygo test
-.PHONY: smoketest smoketest-no-avr
-smoketest: smoketest-no-avr
- tinygo build -size short -o test.elf -target=arduino examples/blinky1
- tinygo build -size short -o test.elf -target=digispark examples/blinky1
-smoketest-no-avr:
+.PHONY: smoketest
+smoketest:
# test all examples
tinygo build -size short -o test.elf -target=pca10040 examples/blinky1
tinygo build -size short -o test.elf -target=pca10040 examples/adc
@@ -123,6 +120,10 @@ smoketest-no-avr:
tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky1
tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky2
tinygo build -size short -o test.elf -target=circuitplay-express examples/i2s
+ifneq ($(AVR), 0)
+ tinygo build -size short -o test.elf -target=arduino examples/blinky1
+ tinygo build -size short -o test.elf -target=digispark examples/blinky1
+endif
tinygo build -o wasm.wasm -target=wasm examples/wasm/export
tinygo build -o wasm.wasm -target=wasm examples/wasm/main