Skip to content

Commit c8d0509

Browse files
authored
Merge pull request #1 from adafruit/master
Update
2 parents f09537b + 2933451 commit c8d0509

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7590
-819
lines changed

.travis.yml

+42-50
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,26 @@ compiler:
66
git:
77
depth: 1
88

9-
# Put a representative board from each port or sub-port near the top
10-
# to determine more quickly whether that port is going to build or not.
9+
# Each item under 'env' is a separate Travis job to execute.
10+
# They run in separate environments, so each one must take the time
11+
# to clone the repository and submodules; to download and install SDKs,
12+
# pip packages, and so forth. By gathering activities together in optimal
13+
# ways, the "run time" and "total time" of the travis jobs can be minimized.
14+
#
15+
# Since at the time of writing Travis generally starts 5 or 6 jobs, the
16+
# builds have been organized into 5 groups of *approximately* equal durations.
17+
# Additionally, the jobs that need extra SDKs are also organized together.
18+
#
19+
# When adding new boards, take a look on the travis CI page
20+
# https://travis-ci.org/adafruit/circuitpython to which build that installs
21+
# that SDK is shortest and add it there. In the case of major re-organizations,
22+
# just try to make the builds "about equal in run time"
1123
env:
12-
- TRAVIS_TEST=unix
13-
- TRAVIS_TEST=docs
14-
- TRAVIS_TEST=translations
15-
- TRAVIS_BOARD=feather_huzzah
16-
- TRAVIS_BOARD=circuitplayground_express
17-
- TRAVIS_BOARD=pca10056
18-
# The rest of the boards, in alphabetical order.
19-
- TRAVIS_BOARD=trinket_m0
20-
- TRAVIS_BOARD=feather_m4_express
21-
- TRAVIS_BOARD=grandcentral_m4_express
22-
- TRAVIS_BOARD=arduino_zero
23-
- TRAVIS_BOARD=circuitplayground_express_crickit
24-
- TRAVIS_BOARD=feather_m0_adalogger
25-
- TRAVIS_BOARD=feather_m0_basic
26-
- TRAVIS_BOARD=feather_m0_express
27-
- TRAVIS_BOARD=feather_m0_express_crickit
28-
- TRAVIS_BOARD=feather_m0_rfm69
29-
- TRAVIS_BOARD=feather_m0_rfm9x
30-
- TRAVIS_BOARD=feather_nrf52832
31-
- TRAVIS_BOARD=feather_nrf52840_express
32-
- TRAVIS_BOARD=feather_radiofruit_zigbee
33-
- TRAVIS_BOARD=gemma_m0
34-
- TRAVIS_BOARD=hallowing_m0_express
35-
- TRAVIS_BOARD=itsybitsy_m0_express
36-
- TRAVIS_BOARD=itsybitsy_m4_express
37-
- TRAVIS_BOARD=metro_m0_express
38-
- TRAVIS_BOARD=metro_m4_express
39-
- TRAVIS_BOARD=pca10059
40-
- TRAVIS_BOARD=pirkey_m0
41-
- TRAVIS_BOARD=trellis_m4_express
24+
- TRAVIS_TESTS="unix docs translations" TRAVIS_BOARDS="feather_huzzah circuitplayground_express pca10056 pca10059 feather_nrf52832 feather_nrf52840_express" TRAVIS_SDK=arm:nrf:esp8266
25+
- TRAVIS_BOARDS="metro_m0_express metro_m4_express pirkey_m0 trellis_m4_express trinket_m0" TRAVIS_SDK=arm
26+
- TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express" TRAVIS_SDK=arm
27+
- TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero" TRAVIS_SDK=arm
28+
- TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express" TRAVIS_SDK=arm
4229

4330
addons:
4431
artifacts:
@@ -57,21 +44,28 @@ notifications:
5744
on_error: always
5845

5946
before_script:
47+
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
6048
- sudo dpkg --add-architecture i386
6149

62-
- ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
50+
- (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
6351

6452
# For nrf builds
65-
- ([[ $TRAVIS_BOARD != "feather_nrf52832" && $TRAVIS_BOARD != "feather_nrf52840_express" && $TRAVIS_BOARD != "pca10056" && $TRAVIS_BOARD != "pca10059" ]] || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
53+
- (! var_search "${TRAVIS_SDK-}" nrf || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
54+
6655
# For huzzah builds
67-
- if [[ $TRAVIS_BOARD = "feather_huzzah" ]]; then wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz; PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi
56+
- (! var_search "${TRAVIS_SDK-}" esp8266 || (wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar -C .. -xavf xtensa-lx106-elf-standalone.tar.gz))
57+
- if var_search "${TRAVIS_SDK-}" esp8266 ; then PATH=$(readlink -f ../xtensa-lx106-elf/bin):$PATH; fi
58+
6859
# For coverage testing (upgrade is used to get latest urllib3 version)
69-
- ([[ -z "$TRAVIS_TEST" ]] || sudo apt-get install -y python3-pip)
70-
- ([[ -z "$TRAVIS_TEST" ]] || sudo pip install --upgrade cpp-coveralls)
71-
- ([[ $TRAVIS_TEST != "docs" ]] || sudo pip install 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
72-
- ([[ $TRAVIS_TEST != "translations" ]] || sudo pip3 install polib)
60+
- ([[ -z "$TRAVIS_TESTS" ]] || sudo apt-get install -y python3-pip)
61+
- ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls)
62+
- (! var_search "${TRAVIS_TESTS-}" docs || sudo pip install 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
63+
- (! var_search "${TRAVIS_TESTS-}" translations || sudo pip3 install polib)
64+
65+
# report some good version numbers to the build
7366
- gcc --version
74-
- ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || arm-none-eabi-gcc --version)
67+
- (! var_search "${TRAVIS_SDK-}" elf || arm-none-eabi-gcc --version)
68+
- (! var_search "${TRAVIS_SDK-}" esp8266 || xtensa-lx106-elf-gcc --version)
7569
- python3 --version
7670

7771
script:
@@ -81,13 +75,11 @@ script:
8175
- echo -en 'travis_fold:end:mpy-cross\\r'
8276

8377
- echo 'Building Adafruit binaries' && echo -en 'travis_fold:start:adafruit-bins\\r'
84-
- ([[ -z "$TRAVIS_BOARD" ]] || tools/build_adafruit_bins.sh)
78+
- (for board in $TRAVIS_BOARDS; do TRAVIS_BOARD=$board tools/build_adafruit_bins.sh || exit $?; done)
8579
- echo -en 'travis_fold:end:adafruit-bins\\r'
8680

8781
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
88-
- ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix deplibs -j2)
89-
- ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix -j2)
90-
- ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix coverage -j2)
82+
- (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2))
9183
- echo -en 'travis_fold:end:unix\\r'
9284

9385
# run tests without coverage info
@@ -96,27 +88,27 @@ script:
9688

9789
# run tests with coverage info
9890
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
99-
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
91+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
10092
- echo -en 'travis_fold:end:test_all\\r'
10193

10294
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
103-
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
95+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
10496
- echo -en 'travis_fold:end:test_threads\\r'
10597

10698
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
107-
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
99+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
108100
- echo -en 'travis_fold:end:test_native\\r'
109101

110102
- (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r')
111-
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float))
103+
- (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float))
112104
- echo -en 'travis_fold:end:test_mpy\\r'
113105

114106
- (echo 'Building docs' && echo -en 'travis_fold:start:build_docs\\r')
115-
- ([[ $TRAVIS_TEST != "docs" ]] || sphinx-build -E -W -b html . _build/html)
107+
- (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html)
116108
- echo -en 'travis_fold:end:build_docs\\r'
117109

118110
- (echo 'Building translations' && echo -en 'travis_fold:start:build_translations\\r')
119-
- ([[ $TRAVIS_TEST != "translations" ]] || make check-translate)
111+
- (! var_search "${TRAVIS_TESTS-}" translations || make check-translate)
120112
- echo -en 'travis_fold:end:build_translations\\r'
121113

122114
# run coveralls coverage analysis (try to, even if some builds/tests failed)

0 commit comments

Comments
 (0)