|
1 |
| -sudo: required |
2 |
| -dist: trusty |
3 | 1 | language: c
|
4 |
| -compiler: |
5 |
| - - gcc |
| 2 | +sudo: false |
| 3 | +env: |
| 4 | + # Target commit for https://github.com/pfalcon/esp-open-sdk/ |
| 5 | + CROSS_ROOT="${HOME}/toolchain-xtensa" |
| 6 | + CROSS_BINDIR="${CROSS_ROOT}/bin" |
| 7 | + PATH=${PATH}:${CROSS_BINDIR} |
6 | 8 | cache:
|
7 | 9 | directories:
|
8 |
| - - "${HOME}/persist" |
| 10 | + - ${CROSS_ROOT} |
| 11 | +addons: |
| 12 | + apt: |
| 13 | + packages: |
| 14 | + - make |
| 15 | + - unrar |
| 16 | + - autoconf |
| 17 | + - automake |
| 18 | + - libtool |
| 19 | + - gcc |
| 20 | + - g++ |
| 21 | + - gperf |
| 22 | + - flex |
| 23 | + - bison |
| 24 | + - texinfo |
| 25 | + - gawk |
| 26 | + - libncurses5-dev |
| 27 | + - libexpat1-dev |
| 28 | + - python |
| 29 | + - python-serial |
| 30 | + - sed |
| 31 | + - git |
| 32 | + - help2man |
9 | 33 |
|
10 |
| -before_script: |
11 |
| -# Extra CPython versions |
12 |
| -# - sudo add-apt-repository -y ppa:fkrull/deadsnakes |
13 |
| -# Extra gcc versions |
14 |
| -# - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test |
15 |
| - - sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded |
16 |
| - - sudo dpkg --add-architecture i386 |
17 |
| - - sudo apt-get update -qq || true |
18 |
| - - sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system gcc-mingw-w64 |
19 |
| - - sudo apt-get install -y --force-yes gcc-arm-none-eabi |
20 |
| - # For teensy build |
21 |
| - - sudo apt-get install realpath |
22 |
| - # For coverage testing (upgrade is used to get latest urllib3 version) |
23 |
| - - sudo pip install --upgrade cpp-coveralls |
24 |
| - - gcc --version |
25 |
| - - arm-none-eabi-gcc --version |
26 |
| - - python3 --version |
| 34 | +before_install: |
| 35 | + # Install a toolchain using esp-open-sdk (parts we need for this are the GNU toolchain and libhal) |
| 36 | + # |
| 37 | + # Adds hack of "{$HAS_TC} || -Buildstep-" to avoid rebuilding toolchain if it's already |
| 38 | + # installed from the cache. If this gets any more complex it should be spun out to a standalone shell script. |
| 39 | + - export HAS_TC="test -d ${CROSS_BINDIR}" |
| 40 | + - unset CC # Travis sets this due to "language: c", but it confuses autotools configure when cross-building |
| 41 | + - ${HAS_TC} || git clone --recursive https://github.com/pfalcon/esp-open-sdk.git |
| 42 | + - ${HAS_TC} || cd esp-open-sdk |
| 43 | + - ${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... |
| 44 | + - ${HAS_TC} || sed -r -i 's%TOOLCHAIN ?=.*%TOOLCHAIN=${CROSS_ROOT}%' Makefile |
| 45 | + - ${HAS_TC} || make |
27 | 46 |
|
28 | 47 | script:
|
| 48 | + - cd ${TRAVIS_BUILD_DIR} |
29 | 49 | - make -C mpy-cross
|
30 |
| - - make -C ports/minimal CROSS=1 build/firmware.bin |
31 |
| - - ls -l ports/minimal/build/firmware.bin |
32 |
| - - tools/check_code_size.sh |
33 |
| - - mkdir -p ${HOME}/persist |
34 |
| - # Save new firmware for reference, but only if building a main branch, not a pull request |
35 |
| - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cp ports/minimal/build/firmware.bin ${HOME}/persist/; fi' |
36 |
| - - make -C ports/unix deplibs |
37 |
| - - make -C ports/unix |
38 |
| - - make -C ports/unix nanbox |
39 |
| - - make -C ports/bare-arm |
40 |
| - - make -C ports/qemu-arm test |
41 |
| - - make -C ports/stm32 |
42 |
| - - make -C ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=1 MICROPY_PY_CC3K=1 |
43 |
| - - make -C ports/stm32 BOARD=STM32F769DISC |
44 |
| - - make -C ports/stm32 BOARD=STM32L476DISC |
45 |
| - - make -C ports/teensy |
46 |
| - - make -C ports/cc3200 BTARGET=application BTYPE=release |
47 |
| - - make -C ports/cc3200 BTARGET=bootloader BTYPE=release |
48 |
| - - make -C ports/windows CROSS_COMPILE=i686-w64-mingw32- |
49 |
| - |
50 |
| - # run tests without coverage info |
51 |
| - #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests) |
52 |
| - #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests --emit native) |
53 |
| - |
54 |
| - # run tests with coverage info |
55 |
| - - make -C ports/unix coverage |
56 |
| - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests) |
57 |
| - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -d thread) |
58 |
| - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --emit native) |
59 |
| - - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests --via-mpy -d basics float) |
60 |
| - |
61 |
| - # run coveralls coverage analysis (try to, even if some builds/tests failed) |
62 |
| - - (cd ports/unix && coveralls --root ../.. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod) |
63 |
| - |
64 |
| -after_failure: |
65 |
| - - (cd tests && for exp in *.exp; do testbase=$(basename $exp .exp); echo -e "\nFAILURE $testbase"; diff -u $testbase.exp $testbase.out; done) |
66 |
| - - (grep "FAIL" ports/qemu-arm/build/console.out) |
| 50 | + - make -C ports/esp8266 axtls |
| 51 | + - make -C ports/esp8266 |
0 commit comments