Speed up the Travis build.
This does two major things: 1. It stores the arm gcc in the repo. The download from the PPA was taking between 2 and 7 minutes. 2. It splits each board into a separate job so they are built in parallel.
This commit is contained in:
parent
2d0d1ef5f2
commit
b1998cb0b1
|
@ -11,6 +11,7 @@
|
||||||
*.jpg binary
|
*.jpg binary
|
||||||
*.dxf binary
|
*.dxf binary
|
||||||
*.mpy binary
|
*.mpy binary
|
||||||
|
*.deb binary
|
||||||
|
|
||||||
# These should also not be modified by git.
|
# These should also not be modified by git.
|
||||||
tests/basics/string_cr_conversion.py -text
|
tests/basics/string_cr_conversion.py -text
|
||||||
|
|
57
.travis.yml
57
.travis.yml
|
@ -3,9 +3,18 @@ dist: trusty
|
||||||
language: c
|
language: c
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
cache:
|
env:
|
||||||
directories:
|
- TRAVIS_BOARD=arduino_zero
|
||||||
- "${HOME}/persist"
|
- TRAVIS_BOARD=circuitplayground_express
|
||||||
|
- TRAVIS_BOARD=feather_m0_basic
|
||||||
|
- TRAVIS_BOARD=feather_m0_adalogger
|
||||||
|
- TRAVIS_BOARD=feather_m0_express
|
||||||
|
- TRAVIS_BOARD=metro_m0_express
|
||||||
|
- TRAVIS_BOARD=metro_m4_express
|
||||||
|
- TRAVIS_BOARD=trinket_m0
|
||||||
|
- TRAVIS_BOARD=gemma_m0
|
||||||
|
- TRAVIS_TEST=qemu
|
||||||
|
- TRAVIS_TEST=unix
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -30,17 +39,18 @@ notifications:
|
||||||
on_error: always
|
on_error: always
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
|
||||||
- sudo dpkg --add-architecture i386
|
- sudo dpkg --add-architecture i386
|
||||||
- sudo apt-get update -qq || true
|
- sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system
|
||||||
- sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system gcc-mingw-w64
|
- ([[ -z "$TRAVIS_TEST" ]] || sudo apt-get install -y qemu-system)
|
||||||
- sudo apt-get install -y --force-yes gcc-arm-embedded
|
- ([[ -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))
|
||||||
|
- ([[ $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))
|
||||||
|
|
||||||
# For teensy build
|
# For teensy build
|
||||||
- sudo apt-get install realpath
|
- sudo apt-get install realpath
|
||||||
# For coverage testing (upgrade is used to get latest urllib3 version)
|
# For coverage testing (upgrade is used to get latest urllib3 version)
|
||||||
- sudo pip install --upgrade cpp-coveralls
|
- sudo pip install --upgrade cpp-coveralls
|
||||||
- gcc --version
|
- gcc --version
|
||||||
- arm-none-eabi-gcc --version
|
- ([[ -z "$TRAVIS_BOARD" ]] || arm-none-eabi-gcc --version)
|
||||||
- python3 --version
|
- python3 --version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
@ -48,21 +58,19 @@ script:
|
||||||
- echo 'Building mpy-cross' && echo -en 'travis_fold:start:mpy-cross\\r'
|
- echo 'Building mpy-cross' && echo -en 'travis_fold:start:mpy-cross\\r'
|
||||||
- make -C mpy-cross
|
- make -C mpy-cross
|
||||||
- echo -en 'travis_fold:end:mpy-cross\\r'
|
- echo -en 'travis_fold:end:mpy-cross\\r'
|
||||||
|
|
||||||
- echo 'Building Adafruit binaries' && echo -en 'travis_fold:start:adafruit-bins\\r'
|
- echo 'Building Adafruit binaries' && echo -en 'travis_fold:start:adafruit-bins\\r'
|
||||||
- tools/build_adafruit_bins.sh
|
- ([[ -z "$TRAVIS_BOARD" ]] || tools/build_adafruit_bins.sh)
|
||||||
- echo -en 'travis_fold:end:adafruit-bins\\r'
|
- echo -en 'travis_fold:end:adafruit-bins\\r'
|
||||||
- make -C ports/minimal CROSS=1 build/firmware.bin
|
|
||||||
- ls -l ports/minimal/build/firmware.bin
|
|
||||||
#- mkdir -p ${HOME}/persist
|
|
||||||
# Save new firmware for reference, but only if building a main branch, not a pull request
|
|
||||||
#- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cp ports/minimal/build/firmware.bin ${HOME}/persist/; fi'
|
|
||||||
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
|
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
|
||||||
- make -C ports/unix deplibs
|
- ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix deplibs)
|
||||||
- make -C ports/unix
|
- ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix)
|
||||||
- make -C ports/unix coverage
|
- ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix coverage)
|
||||||
- echo -en 'travis_fold:end:unix\\r'
|
- echo -en 'travis_fold:end:unix\\r'
|
||||||
|
|
||||||
- echo 'Building qemu' && echo -en 'travis_fold:start:qemu\\r'
|
- echo 'Building qemu' && echo -en 'travis_fold:start:qemu\\r'
|
||||||
- make -C ports/qemu-arm test
|
- ([[ $TRAVIS_TEST != "qemu" ]] || make -C ports/qemu-arm test)
|
||||||
- echo -en 'travis_fold:end:qemu\\r'
|
- echo -en 'travis_fold:end:qemu\\r'
|
||||||
|
|
||||||
# run tests without coverage info
|
# run tests without coverage info
|
||||||
|
@ -71,16 +79,19 @@ script:
|
||||||
|
|
||||||
# run tests with coverage info
|
# run tests with coverage info
|
||||||
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
|
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
|
||||||
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests)
|
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests))
|
||||||
- echo -en 'travis_fold:end:test_all\\r'
|
- echo -en 'travis_fold:end:test_all\\r'
|
||||||
|
|
||||||
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
|
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
|
||||||
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread)
|
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread))
|
||||||
- echo -en 'travis_fold:end:test_threads\\r'
|
- echo -en 'travis_fold:end:test_threads\\r'
|
||||||
|
|
||||||
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
|
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
|
||||||
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native)
|
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native))
|
||||||
- echo -en 'travis_fold:end:test_native\\r'
|
- echo -en 'travis_fold:end:test_native\\r'
|
||||||
- echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r'
|
|
||||||
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float)
|
- (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r')
|
||||||
|
- ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float))
|
||||||
- echo -en 'travis_fold:end:test_mpy\\r'
|
- echo -en 'travis_fold:end:test_mpy\\r'
|
||||||
|
|
||||||
# run coveralls coverage analysis (try to, even if some builds/tests failed)
|
# run coveralls coverage analysis (try to, even if some builds/tests failed)
|
||||||
|
|
|
@ -9,7 +9,13 @@ if [ "$TRAVIS" == "true" ]; then
|
||||||
PARALLEL="-j 2"
|
PARALLEL="-j 2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for board in $ATMEL_BOARDS; do
|
if [ -z "$TRAVIS_BOARD" ]; then
|
||||||
|
boards=$ATMEL_BOARDS
|
||||||
|
else
|
||||||
|
boards=$TRAVIS_BOARD
|
||||||
|
fi
|
||||||
|
|
||||||
|
for board in $boards; do
|
||||||
make $PARALLEL -C ports/atmel-samd BOARD=$board
|
make $PARALLEL -C ports/atmel-samd BOARD=$board
|
||||||
(( exit_status = exit_status || $? ))
|
(( exit_status = exit_status || $? ))
|
||||||
done
|
done
|
||||||
|
@ -32,7 +38,7 @@ if [ "$TRAVIS" == "true" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for board in $ATMEL_BOARDS; do
|
for board in $boards; do
|
||||||
mkdir -p bin/$board/
|
mkdir -p bin/$board/
|
||||||
cp ports/atmel-samd/build-$board/firmware.bin bin/$board/adafruit-circuitpython-$board-$version.bin
|
cp ports/atmel-samd/build-$board/firmware.bin bin/$board/adafruit-circuitpython-$board-$version.bin
|
||||||
(( exit_status = exit_status || $? ))
|
(( exit_status = exit_status || $? ))
|
||||||
|
|
Loading…
Reference in New Issue