-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
82 lines (63 loc) · 2.02 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
dist: trusty
sudo: required
language: cpp
notifications:
email: false
branches:
only:
- master
- release
cache:
# cache the files for 3 hours
timeout: 10800
directories:
# cache the arm-none-eabi location
- $HOME/arm-none-eabi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
install:
# clone git repo to the $HOME folder
- git clone https://github.com/R2D2-2019/R2D2-build.git $HOME/r2d2 --depth=10
# update the submodules with a depth of 50 to limit the size a bit
- cd $HOME/r2d2
- git submodule update --init --depth=50
jobs:
include:
- stage: Tests
script:
# make installer executable
- chmod +x $HOME/r2d2/programs/travis-ci/install_arm-eabi-gcc.sh
# run installer
- $HOME/r2d2/programs/travis-ci/install_arm-eabi-gcc.sh
# add arm-eabi-gcc to path
- export PATH=$PATH:$HOME/arm-none-eabi/bin/
# copy the currently building repo into a build_module
- cp -r $TRAVIS_BUILD_DIR $HOME/r2d2/modules/build_module
# go into the modules folder of the build system
- cd $HOME/r2d2/modules/build_module/code
# build the module
- make build
- make clean
name: "Arduino build"
- script:
# install gcc/g++-7
- sudo apt-get -qq update
- sudo apt-get -qq install g++-7 -y
# Change symlinks of gcc to gcc-7
- sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-7 /usr/bin/gcc
- sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-7 /usr/bin/g++
# link to /bin/ location
- sudo ln -s /usr/bin/gcc /bin/gcc
- sudo ln -s /usr/bin/g++ /bin/g++
# copy the currently building repo into a build_module
- cp -r $TRAVIS_BUILD_DIR $HOME/r2d2/modules/build_module
# go into the modules folder of the build system
- cd $HOME/r2d2/modules/build_module/test
# build the module
- make build
- make run
- make clean
name: "Native tests"