forked from esp8266/source-code-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (68 loc) · 2.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
language: c
sudo: false
env:
# Target commit for https://github.com/pfalcon/esp-open-sdk/
OPENSDK_COMMIT=2df0123d9f201ff3351139cb2912f748ec74caf1
CROSS_ROOT="${HOME}/toolchain-${OPENSDK_COMMIT}"
CROSS_BINDIR="${CROSS_ROOT}/bin"
XTENSA_TOOLS_ROOT="${CROSS_BINDIR}"
SDK_BASE="${CROSS_ROOT}/sdk"
PATH=${PATH}:${CROSS_BINDIR}
cache:
directories:
- ${CROSS_ROOT}
- ${HOME}/.ccache
addons:
apt:
packages:
- make
- unrar
- autoconf
- automake
- libtool
- gcc
- g++
- gperf
- flex
- bison
- texinfo
- gawk
- libncurses5-dev
- libexpat1-dev
- python
- python-serial
- sed
- git
- libgmp-dev
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.
- cd ${HOME}
- 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
- ${HAS_TC} || ( make STANDALONE=y && mv *sdk* ${CROSS_ROOT}/ )
# Get ATS source code
- cd ${HOME}
- git clone https://github.com/githwxi/ATS-Postiats.git
- git clone https://github.com/githwxi/ATS-Postiats-contrib.git
# Build ATS1
- export ATSHOME=${HOME}/ats-lang-anairiats-0.2.12
- export ATSHOMERELOC=ATS-0.2.12
- ${HOME}/ATS-Postiats/travis-ci/ats1_setup.sh 0.2.12
- cd ${ATSHOME} && ./configure && make
# Build ATS2
- export PATSHOME=${HOME}/ATS-Postiats
- export PATSHOMERELOC=${HOME}/ATS-Postiats-contrib
- export PATH=${PATH}:${PATSHOME}/bin
- cd ${PATSHOME} && make -f codegen/Makefile_atslib && make -f Makefile_devl src_depend && make -f Makefile_devl all
script:
- cd ${TRAVIS_BUILD_DIR}
- make