2018-07-17 22:39:39 -04:00
|
|
|
# global options
|
2019-02-11 18:55:48 -05:00
|
|
|
dist: xenial
|
2018-07-17 22:39:39 -04:00
|
|
|
language:
|
|
|
|
- c
|
2014-04-14 14:05:47 -04:00
|
|
|
compiler:
|
|
|
|
- gcc
|
2016-10-25 04:07:29 -04:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- "${HOME}/persist"
|
2018-03-08 19:34:46 -05:00
|
|
|
env:
|
2018-07-17 22:39:39 -04:00
|
|
|
global:
|
|
|
|
- MAKEOPTS="-j4"
|
2019-06-23 22:05:17 -04:00
|
|
|
git:
|
|
|
|
submodules: false
|
2014-04-14 14:05:47 -04:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# define the successive stages
|
|
|
|
stages:
|
|
|
|
- name: test
|
2014-04-14 14:05:47 -04:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# define the jobs for the stages
|
|
|
|
# order of the jobs has longest running first to optimise total time
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
# stm32 port
|
|
|
|
- stage: test
|
|
|
|
env: NAME="stm32 port build"
|
|
|
|
install:
|
|
|
|
# need newer gcc version for Cortex-M7 support
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
2018-07-17 22:39:39 -04:00
|
|
|
- sudo apt-get update -qq || true
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo apt-get install gcc-arm-embedded
|
|
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
2018-07-17 22:39:39 -04:00
|
|
|
- arm-none-eabi-gcc --version
|
|
|
|
script:
|
2019-06-23 22:05:17 -04:00
|
|
|
- git submodule update --init lib/lwip lib/mbedtls lib/stm32lib
|
2018-07-17 22:39:39 -04:00
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/stm32
|
|
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1
|
2019-05-31 08:47:00 -04:00
|
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF2
|
2018-07-17 22:39:39 -04:00
|
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=STM32F769DISC
|
|
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=STM32L476DISC
|
2014-05-11 13:33:13 -04:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# qemu-arm port
|
|
|
|
- stage: test
|
|
|
|
env: NAME="qemu-arm port build and tests"
|
|
|
|
install:
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo apt-get install gcc-arm-none-eabi
|
|
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
2018-07-17 22:39:39 -04:00
|
|
|
- sudo apt-get install qemu-system
|
|
|
|
- arm-none-eabi-gcc --version
|
2019-02-11 18:55:48 -05:00
|
|
|
- qemu-system-arm --version
|
2018-07-17 22:39:39 -04:00
|
|
|
script:
|
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/qemu-arm -f Makefile.test test
|
|
|
|
after_failure:
|
|
|
|
- grep "FAIL" ports/qemu-arm/build/console.out
|
2015-03-01 08:37:27 -05:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# unix coverage
|
|
|
|
- stage: test
|
|
|
|
env: NAME="unix coverage build and tests"
|
|
|
|
install:
|
|
|
|
- sudo pip install cpp-coveralls
|
|
|
|
- gcc --version
|
|
|
|
- python3 --version
|
|
|
|
script:
|
2019-06-23 22:05:17 -04:00
|
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
2018-07-17 22:39:39 -04:00
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/unix deplibs
|
|
|
|
- make ${MAKEOPTS} -C ports/unix coverage
|
|
|
|
# run the main test suite
|
|
|
|
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests)
|
|
|
|
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread)
|
|
|
|
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native)
|
2019-02-24 08:20:05 -05:00
|
|
|
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float micropython)
|
|
|
|
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy --emit native -d basics float micropython)
|
2018-07-17 22:39:39 -04:00
|
|
|
# test when input script comes from stdin
|
|
|
|
- cat tests/basics/0prelim.py | ports/unix/micropython_coverage | grep -q 'abc'
|
|
|
|
# run coveralls coverage analysis (try to, even if some builds/tests failed)
|
|
|
|
- (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
|
|
|
|
after_failure:
|
|
|
|
- (cd tests && for exp in *.exp; do testbase=$(basename $exp .exp); echo -e "\nFAILURE $testbase"; diff -u $testbase.exp $testbase.out; done)
|
2015-03-01 08:37:27 -05:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# standard unix port
|
|
|
|
- stage: test
|
|
|
|
env: NAME="unix port build and tests"
|
|
|
|
script:
|
2019-06-23 22:05:17 -04:00
|
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
2018-07-17 22:39:39 -04:00
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/unix deplibs
|
|
|
|
- make ${MAKEOPTS} -C ports/unix
|
|
|
|
- make ${MAKEOPTS} -C ports/unix test
|
2018-02-07 19:30:19 -05:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# unix nanbox
|
|
|
|
- stage: test
|
|
|
|
env: NAME="unix nanbox port build and tests"
|
|
|
|
install:
|
|
|
|
- sudo apt-get install gcc-multilib libffi-dev:i386
|
|
|
|
script:
|
2019-06-23 22:05:17 -04:00
|
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
2018-07-17 22:39:39 -04:00
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/unix deplibs
|
|
|
|
- make ${MAKEOPTS} -C ports/unix nanbox
|
|
|
|
- (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython_nanbox ./run-tests)
|
2014-04-15 07:52:59 -04:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# unix stackless
|
|
|
|
- stage: test
|
|
|
|
env: NAME="unix stackless port build and tests"
|
|
|
|
script:
|
2019-06-23 22:05:17 -04:00
|
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
2018-07-17 22:39:39 -04:00
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/unix deplibs
|
|
|
|
- make ${MAKEOPTS} -C ports/unix CFLAGS_EXTRA="-DMICROPY_STACKLESS=1 -DMICROPY_STACKLESS_STRICT=1"
|
|
|
|
- make ${MAKEOPTS} -C ports/unix test
|
2017-12-16 13:43:30 -05:00
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# windows port via mingw
|
|
|
|
- stage: test
|
|
|
|
env: NAME="windows port build via mingw"
|
|
|
|
install:
|
|
|
|
- sudo apt-get install gcc-mingw-w64
|
|
|
|
script:
|
|
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
|
|
- make ${MAKEOPTS} -C ports/windows CROSS_COMPILE=i686-w64-mingw32-
|
|
|
|
|
2018-07-18 20:36:38 -04:00
|
|
|
# nrf port
|
|
|
|
- stage: test
|
|
|
|
env: NAME="nrf port build"
|
|
|
|
install:
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo apt-get install gcc-arm-none-eabi
|
|
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
2018-07-18 20:36:38 -04:00
|
|
|
- arm-none-eabi-gcc --version
|
|
|
|
script:
|
2019-06-23 22:05:17 -04:00
|
|
|
- git submodule update --init lib/nrfx
|
2018-07-18 20:36:38 -04:00
|
|
|
- make ${MAKEOPTS} -C ports/nrf
|
|
|
|
|
2018-07-17 22:39:39 -04:00
|
|
|
# bare-arm and minimal ports
|
|
|
|
- stage: test
|
|
|
|
env: NAME="bare-arm and minimal ports build"
|
|
|
|
install:
|
|
|
|
- sudo apt-get install gcc-arm-none-eabi
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
2018-07-17 22:39:39 -04:00
|
|
|
- arm-none-eabi-gcc --version
|
|
|
|
script:
|
|
|
|
- make ${MAKEOPTS} -C ports/bare-arm
|
|
|
|
- make ${MAKEOPTS} -C ports/minimal CROSS=1 build/firmware.bin
|
|
|
|
- ls -l ports/minimal/build/firmware.bin
|
|
|
|
- tools/check_code_size.sh
|
|
|
|
- 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'
|
|
|
|
|
|
|
|
# cc3200 port
|
|
|
|
- stage: test
|
|
|
|
env: NAME="cc3200 port build"
|
|
|
|
install:
|
|
|
|
- sudo apt-get install gcc-arm-none-eabi
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
2018-07-17 22:39:39 -04:00
|
|
|
script:
|
|
|
|
- make ${MAKEOPTS} -C ports/cc3200 BTARGET=application BTYPE=release
|
|
|
|
- make ${MAKEOPTS} -C ports/cc3200 BTARGET=bootloader BTYPE=release
|
|
|
|
|
|
|
|
# teensy port
|
|
|
|
- stage: test
|
|
|
|
env: NAME="teensy port build"
|
|
|
|
install:
|
|
|
|
- sudo apt-get install gcc-arm-none-eabi
|
2019-02-11 18:55:48 -05:00
|
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
2018-07-17 22:39:39 -04:00
|
|
|
script:
|
|
|
|
- make ${MAKEOPTS} -C ports/teensy
|