This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
.travis.yml
128 lines (112 loc) · 4.38 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# travis build configuration for ZeroPilot-SW
# This file instructs travis-Ci to run all unit tests on Linux, Macos, and Windows.
# It also instructs Travis to use the embedded compiler (arm-none-eabi) to compile the autopilot and safety code on all 3 OSs.
# travis-Ci only allows a merge if everything builds everywhere and if all unit tests pass everywhere.
language: cpp
sudo: false
matrix:
include:
- os: linux # run unit tests on linux
compiler: gcc
env: TYPE_OF_BUILD="unit tests" CXX_FLAGS="-std=c++11"
addons:
apt:
packages:
- ninja-build
- cmake
install: #install google test
- curl -LO https://github.com/google/googletest/archive/release-1.10.0.tar.gz
- tar xf release-1.10.0.tar.gz
- cd googletest-release-1.10.0
- sudo mkdir build
- cd build
- sudo cmake ..
- sudo make
- sudo make install
script:
- cd $TRAVIS_BUILD_DIR/Autopilot
- ./Tools/build.bash -c -t
- os: linux # check if we can build for the target, from linux
compiler: gcc
env: TYPE_OF_BUILD="for target" CXX_FLAGS="-std=c++11"
addons:
apt:
packages:
- ninja-build
- cmake
cache:
directories:
- $HOME/gcc-arm-none-eabi-7-2017-q4-major
install:
- export GCC_DIR=$HOME/gcc-arm-none-eabi-7-2017-q4-major
- export GCC_ARCHIVE=$HOME/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
- export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
- if [ ! -e $GCC_DIR/bin/arm-none-eabi-g++ ]; then wget $GCC_URL -O $GCC_ARCHIVE; tar xfj $GCC_ARCHIVE -C $HOME; fi
- export PATH=$GCC_DIR/bin:$PATH
script:
- cd $TRAVIS_BUILD_DIR/Safety
- ./Tools/build.bash -c
- cd $TRAVIS_BUILD_DIR/Autopilot
- ./Tools/build.bash -c
- os: osx # run unit tests on mac
compiler: clang
env: TYPE_OF_BUILD="unit tests" CXX_FLAGS="-std=c++11"
install: # install google test
- curl -LO https://github.com/google/googletest/archive/release-1.10.0.tar.gz
- tar xf release-1.10.0.tar.gz
- cd googletest-release-1.10.0
- mkdir build
- cd build
- cmake ..
- make
- make install
script:
- cd $TRAVIS_BUILD_DIR/Autopilot
- ./Tools/build.bash -c -t
- os: osx # check if we can build for the target, from mac
compiler: clang
env: TYPE_OF_BUILD="for target" CXX_FLAGS="-std=c++11"
cache:
directories:
- $HOME/gcc-arm-none-eabi-7-2017-q4-major
install:
- export GCC_DIR=$HOME/gcc-arm-none-eabi-7-2017-q4-major
- export GCC_ARCHIVE=$HOME/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
- export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-mac.tar.bz2
- if [ ! -f $GCC_DIR/bin/arm-none-eabi-g++ ]; then wget $GCC_URL -O $GCC_ARCHIVE; tar xfj $GCC_ARCHIVE -C $HOME; fi
- export PATH=$GCC_DIR/bin:$PATH
script:
- cd $TRAVIS_BUILD_DIR/Safety
- ./Tools/build.bash -c
- cd $TRAVIS_BUILD_DIR/Autopilot
- ./Tools/build.bash -c
- os: windows # run unit tests on Windows
env: TYPE_OF_BUILD="unit tests" CXX_FLAGS="-std=c++11" GTEST_ROOT="C:/Program Files (x86)/googletest-distribution/" GMOCK_ROOT="C:/Program Files (x86)/googletest-distribution/"
before install:
- choco upgrade cmake
- choco install ninja
install:
- mkdir $HOME/gtest
- cd $HOME/gtest
- wget https://github.com/google/googletest/archive/release-1.10.0.zip
- 7z x release-1.10.0.zip -r
- cd googletest-release-1.10.0
- mkdir build
- cd build
- cmake -G "Ninja" ..
- ninja
- ninja install
script:
- cd $TRAVIS_BUILD_DIR/Autopilot
- ./Tools/build.bash -c -t
- os: windows # check if we can build for the target, from Windows
env: TYPE_OF_BUILD="for target" CXX_FLAGS="-std=c++11"
before install:
- choco upgrade cmake
install:
- choco install gcc-arm-embedded
script:
- cd $TRAVIS_BUILD_DIR/Autopilot
- ./Tools/build.bash -c
- cd $TRAVIS_BUILD_DIR/Safety
- ./Tools/build.bash -c