e06dcad5d3
Toolchain installation and build takes about 3 minutes.
198 lines
7.9 KiB
YAML
198 lines
7.9 KiB
YAML
# global options
|
|
dist: xenial
|
|
language:
|
|
- c
|
|
compiler:
|
|
- gcc
|
|
cache:
|
|
directories:
|
|
- "${HOME}/persist"
|
|
env:
|
|
global:
|
|
- MAKEOPTS="-j4"
|
|
git:
|
|
submodules: false
|
|
|
|
# define the successive stages
|
|
stages:
|
|
- name: test
|
|
|
|
# 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
|
|
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
|
- sudo apt-get update -qq || true
|
|
- sudo apt-get install gcc-arm-embedded
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
|
- arm-none-eabi-gcc --version
|
|
script:
|
|
- git submodule update --init lib/lwip lib/mbedtls lib/stm32lib
|
|
- 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
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF2
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=STM32F769DISC
|
|
- make ${MAKEOPTS} -C ports/stm32 BOARD=STM32L476DISC
|
|
|
|
# qemu-arm port
|
|
- stage: test
|
|
env: NAME="qemu-arm port build and tests"
|
|
install:
|
|
- sudo apt-get install gcc-arm-none-eabi
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
|
- sudo apt-get install qemu-system
|
|
- arm-none-eabi-gcc --version
|
|
- qemu-system-arm --version
|
|
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
|
|
|
|
# unix coverage
|
|
- stage: test
|
|
env: NAME="unix coverage build and tests"
|
|
install:
|
|
- sudo pip install cpp-coveralls
|
|
- gcc --version
|
|
- python3 --version
|
|
script:
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
|
- 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)
|
|
- (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)
|
|
# 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)
|
|
|
|
# standard unix port
|
|
- stage: test
|
|
env: NAME="unix port build and tests"
|
|
script:
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
- make ${MAKEOPTS} -C ports/unix deplibs
|
|
- make ${MAKEOPTS} -C ports/unix
|
|
- make ${MAKEOPTS} -C ports/unix test
|
|
|
|
# unix nanbox
|
|
- stage: test
|
|
env: NAME="unix nanbox port build and tests"
|
|
install:
|
|
- sudo apt-get install gcc-multilib libffi-dev:i386
|
|
script:
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
|
- 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)
|
|
|
|
# unix stackless
|
|
- stage: test
|
|
env: NAME="unix stackless port build and tests"
|
|
script:
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx lib/libffi
|
|
- 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
|
|
|
|
# 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-
|
|
|
|
# esp32 port
|
|
- stage: test
|
|
env: NAME="esp32 port build"
|
|
install:
|
|
- sudo apt-get install python3-pip
|
|
- sudo pip3 install pyparsing
|
|
- wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
|
|
- zcat xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz | tar x
|
|
- export PATH=$(pwd)/xtensa-esp32-elf/bin:$PATH
|
|
- git clone https://github.com/espressif/esp-idf.git
|
|
- git -C esp-idf checkout $(grep "ESPIDF_SUPHASH :=" ports/esp32/Makefile | cut -d " " -f 3)
|
|
- git -C esp-idf submodule update --init components/json/cJSON components/esp32/lib components/esptool_py/esptool components/expat/expat components/lwip/lwip components/mbedtls/mbedtls components/micro-ecc/micro-ecc components/nghttp/nghttp2
|
|
script:
|
|
- git submodule update --init lib/berkeley-db-1.xx
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
- make ${MAKEOPTS} -C ports/esp32 ESPIDF=$(pwd)/esp-idf
|
|
|
|
# esp8266 port
|
|
- stage: test
|
|
env: NAME="esp8266 port build"
|
|
install:
|
|
- wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz
|
|
- zcat xtensa-lx106-elf-standalone.tar.gz | tar x
|
|
- export PATH=$(pwd)/xtensa-lx106-elf/bin:$PATH
|
|
script:
|
|
- git submodule update --init lib/axtls lib/berkeley-db-1.xx
|
|
- make ${MAKEOPTS} -C mpy-cross
|
|
- make ${MAKEOPTS} -C ports/esp8266
|
|
|
|
# nrf port
|
|
- stage: test
|
|
env: NAME="nrf port build"
|
|
install:
|
|
- sudo apt-get install gcc-arm-none-eabi
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
|
- arm-none-eabi-gcc --version
|
|
script:
|
|
- git submodule update --init lib/nrfx
|
|
- make ${MAKEOPTS} -C ports/nrf
|
|
|
|
# bare-arm and minimal ports
|
|
- stage: test
|
|
env: NAME="bare-arm and minimal ports build"
|
|
install:
|
|
- sudo apt-get install gcc-arm-none-eabi
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
|
- 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
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
|
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
|
|
- sudo apt-get install libnewlib-arm-none-eabi
|
|
script:
|
|
- make ${MAKEOPTS} -C ports/teensy
|