Skip to content

Commit f0eb4ee

Browse files
aykevldeadprogram
authored andcommitted
ci: make smoketests more flexible
1 parent fa928e8 commit f0eb4ee

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

.circleci/config.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ commands:
5252
key: llvm-source-8-v5
5353
paths:
5454
- llvm-project
55-
smoketest:
56-
steps:
57-
- run: make smoketest
58-
smoketest-no-avr:
59-
steps:
60-
- run: make smoketest-no-avr
6155
test-linux:
6256
steps:
6357
- checkout
@@ -73,7 +67,7 @@ commands:
7367
- run: go install .
7468
- run: go test -v
7569
- run: make gen-device -j4
76-
- smoketest
70+
- run: make smoketest
7771
- save_cache:
7872
key: go-cache-{{ checksum "Gopkg.lock" }}-{{ .Environment.CIRCLE_BUILD_NUM }}
7973
paths:
@@ -155,7 +149,7 @@ commands:
155149
tar -C ~/lib -xf /tmp/tinygo.linux-amd64.tar.gz
156150
ln -s ~/lib/tinygo/bin/tinygo /go/bin/tinygo
157151
tinygo version
158-
- smoketest
152+
- run: make smoketest
159153
build-macos:
160154
steps:
161155
- checkout
@@ -215,7 +209,7 @@ commands:
215209
tar -C /usr/local/opt -xf /tmp/tinygo.darwin-amd64.tar.gz
216210
ln -s /usr/local/opt/tinygo/bin/tinygo /usr/local/bin/tinygo
217211
tinygo version
218-
- smoketest-no-avr
212+
- run: make smoketest AVR=0
219213

220214

221215
jobs:

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,8 @@ test:
8787
tinygo-test:
8888
cd tests/tinygotest && tinygo test
8989

90-
.PHONY: smoketest smoketest-no-avr
91-
smoketest: smoketest-no-avr
92-
tinygo build -size short -o test.elf -target=arduino examples/blinky1
93-
tinygo build -size short -o test.elf -target=digispark examples/blinky1
94-
smoketest-no-avr:
90+
.PHONY: smoketest
91+
smoketest:
9592
# test all examples
9693
tinygo build -size short -o test.elf -target=pca10040 examples/blinky1
9794
tinygo build -size short -o test.elf -target=pca10040 examples/adc
@@ -123,6 +120,10 @@ smoketest-no-avr:
123120
tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky1
124121
tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky2
125122
tinygo build -size short -o test.elf -target=circuitplay-express examples/i2s
123+
ifneq ($(AVR), 0)
124+
tinygo build -size short -o test.elf -target=arduino examples/blinky1
125+
tinygo build -size short -o test.elf -target=digispark examples/blinky1
126+
endif
126127
tinygo build -o wasm.wasm -target=wasm examples/wasm/export
127128
tinygo build -o wasm.wasm -target=wasm examples/wasm/main
128129

0 commit comments

Comments
 (0)