@@ -3,9 +3,18 @@ dist: trusty
33language : c
44compiler :
55 - 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
918
1019addons :
1120 artifacts :
@@ -30,39 +39,38 @@ notifications:
3039 on_error : always
3140
3241before_script :
33- - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
3442 - 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+
3848 # For teensy build
3949 - sudo apt-get install realpath
4050 # For coverage testing (upgrade is used to get latest urllib3 version)
4151 - sudo pip install --upgrade cpp-coveralls
4252 - gcc --version
43- - arm-none-eabi-gcc --version
53+ - ([[ -z "$TRAVIS_BOARD" ]] || arm-none-eabi-gcc --version)
4454 - python3 --version
4555
4656script :
4757 # Build mpy-cross first because other builds depend on it.
4858 - echo 'Building mpy-cross' && echo -en 'travis_fold:start:mpy-cross\\r'
4959 - make -C mpy-cross
5060 - echo -en 'travis_fold:end:mpy-cross\\r'
61+
5162 - 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)
5364 - 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+
5966 - 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)
6370 - echo -en 'travis_fold:end:unix\\r'
71+
6472 - 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)
6674 - echo -en 'travis_fold:end:qemu\\r'
6775
6876 # run tests without coverage info
@@ -71,16 +79,19 @@ script:
7179
7280 # run tests with coverage info
7381 - 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) )
7583 - echo -en 'travis_fold:end:test_all\\r'
84+
7685 - 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) )
7887 - echo -en 'travis_fold:end:test_threads\\r'
88+
7989 - 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) )
8191 - 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))
8495 - echo -en 'travis_fold:end:test_mpy\\r'
8596
8697 # run coveralls coverage analysis (try to, even if some builds/tests failed)
0 commit comments