-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
104 lines (88 loc) · 2.69 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Use full virtualisation to allow adding kernel modules
sudo: true
# Use trusty
# https://docs.travis-ci.com/user/trusty-ci-environment/
dist: trusty
notifications:
email: false
language: c
# enable "Build pushes" and "Build pull requests" in Travis CI
# - pull requests will always be built
# - only build pushes to master
branches:
only:
- master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
# ubuntu-toolchain-r-test
- gcc-6
- g++-6
# llvm-toolchain-trusty-5.0
- clang-5.0
- clang-format-5.0
# trusty repos
- python3
- python3-pip
- libc6-i386
cache:
directories:
- ${HOME}/gcc-arm-none-eabi-6-2017-q2-update
before_script:
# create directory that will be on the PATH
- mkdir -p ${HOME}/.local/bin
- export PATH=${HOME}/.local/bin:${PATH}
- mkdir -p ${HOME}/source
# install GCC ARM from GNU ARM Embedded Toolchain
- export GCC_DIR=${HOME}/gcc-arm-none-eabi-6-2017-q2-update
- export GCC_ARCHIVE=${HOME}/source/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
- export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2?revision=2cc92fb5-3e0e-402d-9197-bdfc8224d8a5?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,6-2017-q2-update
- if [ ! -e ${GCC_DIR}/bin/arm-none-eabi-gcc ]; then
wget $GCC_URL -O $GCC_ARCHIVE;
tar xfj $GCC_ARCHIVE -C ${HOME};
fi
- export PATH=${PATH}:${GCC_DIR}/bin
- ln -sf `which gcc-6` ${HOME}/.local/bin/gcc
# build GNU Make 4.1 from source
# TODO: cache this block as well
- wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
- tar xvf make-4.1.tar.gz
- cd make-4.1
- ./configure --prefix=${HOME}/.local
- make
- make install
- cd ..
- rm -rf make-4.1
# clang
- ln -sf `which clang-5.0` ${HOME}/.local/bin/clang
- ln -sf `which clang-format-5.0` ${HOME}/.local/bin/clang-format
- sudo pip3 install --upgrade setuptools
- sudo pip3 install --upgrade distribute
# Install pylint for python3
- pip3 install --user pylint
# force ${PATH} to update
- hash -r
# print versions of everything
- arm-none-eabi-gcc --version
- arm-none-eabi-objcopy --version
- arm-none-eabi-objdump --version
- arm-none-eabi-size --version
- arm-none-eabi-gcc-ar --version
- arm-none-eabi-gdb --version
- gcc --version
- make --version
- clang --version
- clang-format --version
- pylint --version
script:
- make build_all PLATFORM=x86
- make build_all PLATFORM=stm32f0xx
- make test_all PLATFORM=x86
- make clean
- make build_all PLATFORM=x86 COMPILER=clang
- make lint
- make pylint
- make test_format