8000 .travis.yml: Build esp-open-sdk, based on .travis.yml from esp-open-r… · devmonkZA/micropython@aabca37 · GitHub
[go: up one dir, main page]

Skip to content

Commit aabca37

Browse files
committed
.travis.yml: Build esp-open-sdk, based on .travis.yml from esp-open-rtos.
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.
1 parent 52620c6 commit aabca37

File tree

1 file changed

+44
-59
lines changed

1 file changed

+44
-59
lines changed

.travis.yml

Lines changed: 44 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,51 @@
1-
sudo: required
2-
dist: trusty
31
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}
68
cache:
79
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
933

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
2746

2847
script:
48+
- cd ${TRAVIS_BUILD_DIR}
2949
- 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

Comments
 (0)
0