diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-29 22:55:40 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-09-12 09:06:19 +0300 |
commit | aabca3733a17ffafb71ad38f83b86eba4c560c42 (patch) | |
tree | 974a5dafc3c34d683d937c9c542464daf013067a | |
parent | 52620c6b0e8a601e49866d0db37abbe217b16a0d (diff) |
.travis.yml: Build esp-open-sdk, based on .travis.yml from esp-open-rtos.travis-esp8266
Before picking esp-open-rtos', I tried to add corresponding steps to
standard MicroPython's .travis.yml, but it just doesn't work in that
configuration (sudo: yes is the biggest difference), with completely
senseless errors popping up, and working them around turns into very
time consuming firefighting.
-rw-r--r-- | .travis.yml | 103 |
1 files changed, 44 insertions, 59 deletions
diff --git a/.travis.yml b/.travis.yml index 83ac2a112..5150765a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,66 +1,51 @@ -sudo: required -dist: trusty language: c -compiler: - - gcc +sudo: false +env: + # Target commit for https://github.com/pfalcon/esp-open-sdk/ + CROSS_ROOT="${HOME}/toolchain-xtensa" + CROSS_BINDIR="${CROSS_ROOT}/bin" + PATH=${PATH}:${CROSS_BINDIR} cache: directories: - - "${HOME}/persist" + - ${CROSS_ROOT} +addons: + apt: + packages: + - make + - unrar + - autoconf + - automake + - libtool + - gcc + - g++ + - gperf + - flex + - bison + - texinfo + - gawk + - libncurses5-dev + - libexpat1-dev + - python + - python-serial + - sed + - git + - help2man -before_script: -# Extra CPython versions -# - sudo add-apt-repository -y ppa:fkrull/deadsnakes -# Extra gcc versions -# - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded - - 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 gcc-mingw-w64 - - sudo apt-get install -y --force-yes gcc-arm-none-eabi - # For teensy build - - sudo apt-get install realpath - # For coverage testing (upgrade is used to get latest urllib3 version) - - sudo pip install --upgrade cpp-coveralls - - gcc --version - - arm-none-eabi-gcc --version - - python3 --version +before_install: + # Install a toolchain using esp-open-sdk (parts we need for this are the GNU toolchain and libhal) + # + # Adds hack of "{$HAS_TC} || -Buildstep-" to avoid rebuilding toolchain if it's already + # installed from the cache. If this gets any more complex it should be spun out to a standalone shell script. + - export HAS_TC="test -d ${CROSS_BINDIR}" + - unset CC # Travis sets this due to "language: c", but it confuses autotools configure when cross-building + - ${HAS_TC} || git clone --recursive https://github.com/pfalcon/esp-open-sdk.git + - ${HAS_TC} || cd esp-open-sdk + - ${HAS_TC} || sed -i "s/2.69/2.68/" lx106-hal/configure.ac # this is a nasty hack as Ubuntu Precise only has autoconf 2.68 not 2.69... + - ${HAS_TC} || sed -r -i 's%TOOLCHAIN ?=.*%TOOLCHAIN=${CROSS_ROOT}%' Makefile + - ${HAS_TC} || make script: + - cd ${TRAVIS_BUILD_DIR} - make -C mpy-cross - - make -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' - - make -C ports/unix deplibs - - make -C ports/unix - - make -C ports/unix nanbox - - make -C ports/bare-arm - - make -C ports/qemu-arm test - - make -C ports/stm32 - - make -C ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=1 MICROPY_PY_CC3K=1 - - make -C ports/stm32 BOARD=STM32F769DISC - - make -C ports/stm32 BOARD=STM32L476DISC - - make -C ports/teensy - - make -C ports/cc3200 BTARGET=application BTYPE=release - - make -C ports/cc3200 BTARGET=bootloader BTYPE=release - - make -C ports/windows CROSS_COMPILE=i686-w64-mingw32- - - # run tests without coverage info - #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests) - #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests --emit native) - - # run tests with coverage info - - make -C ports/unix coverage - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests) - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread) - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native) - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float) - - # 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) - - (grep "FAIL" ports/qemu-arm/build/console.out) + - make -C ports/esp8266 axtls + - make -C ports/esp8266 |