2015-08-20 06:21:40 +00:00
|
|
|
language: c
|
|
|
|
sudo: false
|
|
|
|
env:
|
|
|
|
# Target commit for https://github.com/pfalcon/esp-open-sdk/
|
2016-05-03 05:48:13 +00:00
|
|
|
OPENSDK_COMMIT=9bd3aba
|
2015-08-20 06:21:40 +00:00
|
|
|
CROSS_ROOT="${HOME}/toolchain-${OPENSDK_COMMIT}"
|
|
|
|
CROSS_BINDIR="${CROSS_ROOT}/bin"
|
2015-12-30 04:08:31 +00:00
|
|
|
ESPTOOL2_COMMIT=ec0e2c7
|
|
|
|
ESPTOOL2_DIR="${HOME}/esptool2-${ESPTOOL2_COMMIT}"
|
|
|
|
PATH=${PATH}:${CROSS_BINDIR}:${ESPTOOL2_DIR}
|
2016-05-03 21:34:54 +00:00
|
|
|
MAKE_CMD="make WARNINGS_AS_ERRORS=1 -C examples/ build-examples CROSS=\"ccache xtensa-lx106-elf-\""
|
2015-08-20 06:21:40 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- ${CROSS_ROOT}
|
2015-12-30 04:08:31 +00:00
|
|
|
- ${ESPTOOL2_DIR}
|
2015-08-20 06:21:40 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- make
|
|
|
|
- unrar
|
|
|
|
- autoconf
|
|
|
|
- automake
|
|
|
|
- libtool
|
|
|
|
- gcc
|
|
|
|
- g++
|
|
|
|
- gperf
|
|
|
|
- flex
|
|
|
|
- bison
|
|
|
|
- texinfo
|
|
|
|
- gawk
|
|
|
|
- libncurses5-dev
|
|
|
|
- libexpat1-dev
|
|
|
|
- python
|
|
|
|
- python-serial
|
|
|
|
- sed
|
|
|
|
- git
|
|
|
|
|
|
|
|
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} || git reset --hard ${OPENSDK_COMMIT}
|
|
|
|
- ${HAS_TC} || git submodule update
|
|
|
|
- ${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
|
2016-05-03 05:48:13 +00:00
|
|
|
- ${HAS_TC} || make STANDALONE=n
|
2015-12-30 04:08:31 +00:00
|
|
|
- export HAS_ET2="test -f ${ESPTOOL2_DIR}/esptool2"
|
|
|
|
- ${HAS_ET2} || git clone https://github.com/raburton/esptool2 ${ESPTOOL2_DIR}
|
|
|
|
- ${HAS_ET2} || cd ${ESPTOOL2_DIR}
|
|
|
|
- ${HAS_ET2} || git reset --hard ${ESPTOOL2_COMMIT}
|
|
|
|
- ${HAS_ET2} || make
|
2015-08-20 06:21:40 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- cd ${TRAVIS_BUILD_DIR}
|
|
|
|
# Remove ssid_config requirement for examples
|
2016-04-06 18:42:58 +00:00
|
|
|
- sed -i "s%#error%//#error%" include/ssid_config.h
|
2016-05-03 21:34:54 +00:00
|
|
|
# Try building everything w/ non-verbose output (to avoid 4MB log limit), but if it fails then
|
|
|
|
# rerun with V=1 so the error part is output verbosely
|
|
|
|
- ${MAKE_CMD} || ( ${MAKE_CMD} V=1 )
|