This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
/
.travis.yml
76 lines (76 loc) · 1.94 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
language: cpp
os:
- linux
- osx
env:
global:
- ARDUINO_SDK_BASE_PATH=arduino-sdk/arduino
matrix:
- ARDUINO_SDK_VERSION=1.6.10
- ARDUINO_SDK_VERSION=1.8.9
matrix:
include:
- os: linux
service: docker
env: TEST_FEDORA=TRUE
addons: {}
before_install:
- docker build -t fedorabuild .travis-fedora-build
install: []
script:
- docker run -v "$TRAVIS_BUILD_DIR/cmake":/cmake -v "$TRAVIS_BUILD_DIR/examples":/examples fedorabuild
- os: linux
service: docker
env: TEST_ARCH=TRUE
addons: {}
before_install:
- docker build -t archbuild .travis-arch-build
install: []
script:
- docker run -v "$TRAVIS_BUILD_DIR/cmake":/cmake -v "$TRAVIS_BUILD_DIR/examples":/examples archbuild
cache:
directories:
- $HOME/$ARDUINO_SDK_BASE_PATH-$ARDUINO_SDK_VERSION
if: branch != feature/appveyor-ci
addons:
apt:
packages:
- binutils-avr
- avr-libc
- avrdude
- cmake
before_install:
- sdk_path="$HOME/$ARDUINO_SDK_BASE_PATH-$ARDUINO_SDK_VERSION"
- mkdir -p "$sdk_path"
- cd "$sdk_path/../.." # Get one level above 'arduino-sdk'
- |
if [[ -z "$(ls -A "$sdk_path")" ]];
then
if [[ $TRAVIS_OS_NAME == linux ]]; then
sdk_file="arduino-$ARDUINO_SDK_VERSION-linux64.tar.xz"
else
sdk_file="arduino-$ARDUINO_SDK_VERSION-macosx.zip"
fi
wget "https://downloads.arduino.cc/$sdk_file" -O "$sdk_file"
if [[ $TRAVIS_OS_NAME == linux ]]; then
tar -xf "$sdk_file" -C arduino-sdk
else
unzip -q "$sdk_file"
mv Arduino.app/* arduino-sdk/arduino-$ARDUINO_SDK_VERSION
fi
fi
- |
if [[ $TRAVIS_OS_NAME == osx ]]; then
sdk_path="$sdk_path/Contents/Java"
fi
- export ARDUINO_SDK_PATH="$sdk_path"
install:
- cd "$TRAVIS_BUILD_DIR"
- mkdir build
- rm -rf build/*
- cd build/
script:
- cmake -D CMAKE_TOOLCHAIN_FILE="../cmake/Arduino-Toolchain.cmake" ../examples
- make
after_failure:
- cat CMakeFiles/CMakeOutput.log