@@ -3,9 +3,18 @@ dist: trusty
3
3
language : c
4
4
compiler :
5
5
- gcc
6
- cache :
7
- directories :
8
- - " ${HOME}/persist"
6
+ env :
7
+ - TRAVIS_BOARD=arduino_zero
8
+ - TRAVIS_BOARD=circuitplayground_express
9
+ - TRAVIS_BOARD=feather_m0_basic
10
+ - TRAVIS_BOARD=feather_m0_adalogger
11
+ - TRAVIS_BOARD=feather_m0_express
12
+ - TRAVIS_BOARD=metro_m0_express
13
+ - TRAVIS_BOARD=metro_m4_express
14
+ - TRAVIS_BOARD=trinket_m0
15
+ - TRAVIS_BOARD=gemma_m0
16
+ - TRAVIS_TEST=qemu
17
+ - TRAVIS_TEST=unix
9
18
10
19
addons :
11
20
artifacts :
@@ -30,39 +39,38 @@ notifications:
30
39
on_error : always
31
40
32
41
before_script :
33
- - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
34
42
- sudo dpkg --add-architecture i386
35
- - sudo apt-get update -qq || true
36
- - sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system gcc-mingw-w64
37
- - sudo apt-get install -y --force-yes gcc-arm-embedded
43
+ - sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system
44
+ - ([[ -z "$TRAVIS_TEST" ]] || sudo apt-get install -y qemu-system)
45
+ - ([[ -z "$TRAVIS_BOARD" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_6-2017q2-2~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
46
+ - ([[ $TRAVIS_TEST != "qemu" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_6-2017q2-2~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
47
+
38
48
# For teensy build
39
49
- sudo apt-get install realpath
40
50
# For coverage testing (upgrade is used to get latest urllib3 version)
41
51
- sudo pip install --upgrade cpp-coveralls
42
52
- gcc --version
43
- - arm-none-eabi-gcc --version
53
+ - ([[ -z "$TRAVIS_BOARD" ]] || arm-none-eabi-gcc --version)
44
54
- python3 --version
45
55
46
56
script :
47
57
# Build mpy-cross first because other builds depend on it.
48
58
- echo 'Building mpy-cross' && echo -en 'travis_fold:start:mpy-cross\\r'
49
59
- make -C mpy-cross
50
60
- echo -en 'travis_fold:end:mpy-cross\\r'
61
+
51
62
- echo 'Building Adafruit binaries' && echo -en 'travis_fold:start:adafruit-bins\\r'
52
- - tools/build_adafruit_bins.sh
63
+ - ([[ -z "$TRAVIS_BOARD" ]] || tools/build_adafruit_bins.sh)
53
64
-
8000
echo -en 'travis_fold:end:adafruit-bins\\r'
54
- - make -C ports/minimal CROSS=1 build/firmware.bin
55
- - ls -l ports/minimal/build/firmware.bin
56
- # - mkdir -p ${HOME}/persist
57
- # Save new firmware for reference, but only if building a main branch, not a pull request
58
- # - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cp ports/minimal/build/firmware.bin ${HOME}/persist/; fi'
65
+
59
66
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
60
- - make -C ports/unix deplibs
61
- - make -C ports/unix
62
- - make -C ports/unix coverage
67
+ - ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix deplibs)
68
+ - ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix)
69
+ - ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix coverage)
63
70
- echo -en 'travis_fold:end:unix\\r'
71
+
64
72
- echo 'Building qemu' && echo -en 'travis_fold:start:qemu\\r'
65
- - make -C ports/qemu-arm test
73
+ - ([[ $TRAVIS_TEST != "qemu" ]] || make -C ports/qemu-arm test)
66
74
- echo -en 'travis_fold:end:qemu\\r'
67
75
68
76
# run tests without coverage info
@@ -71,16 +79,19 @@ script:
71
79
72
80
# run tests with coverage info
73
81
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
74
- - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests)
82
+ - ([[ $TRAVIS_TEST != "unix" ]] || ( cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests) )
75
83
- echo -en 'travis_fold:end:test_all\\r'
84
+
76
85
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
77
- - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread)
86
+ - ([[ $TRAVIS_TEST != "unix" ]] || ( cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread) )
78
87
- echo -en 'travis_fold:end:test_threads\\r'
88
+
79
89
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
80
- - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native)
90
+ - ([[ $TRAVIS_TEST != "unix" ]] || ( cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native) )
81
91
- echo -en 'travis_fold:end:test_native\\r'
82
- - echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r'
83
- - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float)
92
+
93
+ - (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r')
94
+ - ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float))
84
95
- echo -en 'travis_fold:end:test_mpy\\r'
85
96
86
97
# run coveralls coverage analysis (try to, even if some builds/tests failed)
0 commit comments