8000 .travis.yml: Build esp-open-sdk, based on .travis.yml from esp-open-r… · jensechu/circuitpython@024542e · GitHub 10000
[go: up one dir, main page]

Skip to content

Commit 024542e

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 0be4a77 commit 024542e

File tree

1 file changed

+55
-51
lines changed

1 file changed

+55
-51
lines changed

.travis.yml

Lines changed: 55 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,59 @@
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+
OPENSDK_COMMIT=cd1d336
6+
CROSS_ROOT="${HOME}/toolchain-${OPENSDK_COMMIT}"
7+
CROSS_BINDIR="${CROSS_ROOT}/bin"
8+
ESPTOOL2_COMMIT=ec0e2c7
9+
ESPTOOL2_DIR="${HOME}/esptool2-${ESPTOOL2_COMMIT}"
10+
PATH=${PATH}:${CROSS_BINDIR}:${ESPTOOL2_DIR}
11+
cache:
12+
directories:
13+
- ${CROSS_ROOT}
14+
- ${ESPTOOL2_DIR}
15+
addons:
16+
apt:
17+
packages:
18+
- make
19+
- unrar
20+
- autoconf
21+
- automake
22+
- libtool
23+
- gcc
24+
- g++
25+
- gperf
26+
- flex
27+
- bison
28+
- texinfo
29+
- gawk
30+
- libncurses5-dev
31+
- libexpat1-dev
32+
- python
33+
- python-serial
34+
- sed
35+
- git
636

7-
before_script:
8-
# Extra CPython versions
9-
# - sudo add-apt-repository -y ppa:fkrull/deadsnakes
10-
# Extra gcc versions
11-
# - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
12-
- sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
13-
- sudo dpkg --add-architecture i386
14-
- sudo apt-get update -qq || true
15-
- sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system mingw32
16-
- sudo apt-get install -y --force-yes gcc-arm-none-eabi
17-
# For teensy build
18-
- sudo apt-get install realpath
19-
# For coverage testing
20-
- sudo pip install cpp-coveralls
21-
- gcc --version
22-
- arm-none-eabi-gcc --version
23-
- python3 --version
37+
before_install:
38+
# Install a toolchain using esp-open-sdk (parts we need for this are the GNU toolchain and libhal)
39+
#
40+
# Adds hack of "{$HAS_TC} || -Buildstep-" to avoid rebuilding toolchain if it's already
41+
# installed from the cache. If this gets any more complex it should be spun out to a standalone shell script.
42+
- export HAS_TC="test -d ${CROSS_BINDIR}"
43+
- unset CC # Travis sets this due to "language: c", but it confuses autotools configure when cross-building
44+
- ${HAS_TC} || git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
45+
- ${HAS_TC} || cd esp-open-sdk
46+
- ${HAS_TC} || git reset --hard ${OPENSDK_COMMIT}
47+
- ${HAS_TC} || git submodule update
48+
- ${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...
49+
- ${HAS_TC} || sed -r -i 's%TOOLCHAIN ?=.*%TOOLCHAIN=${CROSS_ROOT}%' Makefile
50+
- ${HAS_TC} || make STANDALONE=n
51+
- export HAS_ET2="test -f ${ESPTOOL2_DIR}/esptool2"
52+
- ${HAS_ET2} || git clone https://github.com/raburton/esptool2 ${ESPTOOL2_DIR}
53+
- ${HAS_ET2} || cd ${ESPTOOL2_DIR}
54+
- ${HAS_ET2} || git reset --hard ${ESPTOOL2_COMMIT}
55+
- ${HAS_ET2} || make
2456

2557
script:
26-
- make -C minimal test
27-
- make -C unix deplibs
28-
- make -C unix
29-
- make -C unix nanbox
30-
- make -C bare-arm
31-
- make -C qemu-arm test
32-
- make -C stmhal
33-
- make -C stmhal -B MICROPY_PY_WIZNET5K=1 MICROPY_PY_CC3K=1
34-
- make -C stmhal BOARD=STM32F4DISC
35-
- make -C teensy
36-
- make -C cc3200 BTARGET=application BTYPE=release
37-
- make -C cc3200 BTARGET=bootloader BTYPE=release
38-
- make -C windows CROSS_COMPILE=i586-mingw32msvc-
39-
40-
# run tests without coverage info
41-
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests)
42-
#- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests --emit native)
43-
44-
# run tests with coverage info
45-
- make -C unix coverage
46-
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../unix/micropython_coverage ./run-tests)
47-
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../unix/micropython_coverage ./run-tests -d thread)
48-
- (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../unix/micropython_coverage ./run-tests --emit native)
49-
50-
after_success:
51-
- (cd unix && coveralls --root .. --build-root . --gcov $(which gcov) --gcov-options '\-o build-coverage/' --include py --include extmod)
52-
53-
after_failure:
54-
- (cd tests && for exp in *.exp; do testbase=$(basename $exp .exp); echo -e "\nFAILURE $testbase"; diff -u $testbase.exp $testbase.out; done)
55-
- (grep "FAIL" qemu-arm/build/console.out)
58+
- cd ${TRAVIS_BUILD_DIR}
59+
- make -C esp8266

0 commit comments

Comments
 (0)
0