-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (58 loc) · 1.87 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
dist: trusty
sudo: false
os:
- linux
- osx
# Only test direct pushes to master
#
branches:
only:
- master
env:
global:
- DEPS_DIR=$HOME/deps \
ARDUINO_VERSION=1.8.5
install: |
# Install Arduino SDK
#
mkdir -p "${DEPS_DIR}"
cd "${DEPS_DIR}"
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
export ARDUINO_DIR=${DEPS_DIR}/Arduino.app/Contents/Java
if [ ! -d "${ARDUINO_DIR}" ]; then
ARDUINO_HOST_PLATFORM="macosx"
ARDUINO_ARCHIVE="arduino-${ARDUINO_VERSION}-${ARDUINO_HOST_PLATFORM}.zip"
wget "http://downloads.arduino.cc/${ARDUINO_ARCHIVE}"
unzip "${ARDUINO_ARCHIVE}"
fi
else
export ARDUINO_DIR=${DEPS_DIR}/arduino-${ARDUINO_VERSION}
if [ ! -d "${ARDUINO_DIR}" ]; then
ARDUINO_HOST_PLATFORM="linux64"
ARDUINO_ARCHIVE="arduino-${ARDUINO_VERSION}-${ARDUINO_HOST_PLATFORM}.tar.xz"
wget "http://downloads.arduino.cc/${ARDUINO_ARCHIVE}"
tar xJf "${ARDUINO_ARCHIVE}"
fi
fi
export ARDUINO_SDK_PATH=${ARDUINO_DIR}
script:
- cd $HOME
- mkdir -p hardware
- git clone --recursive https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio.git hardware/keyboardio
- cd hardware/keyboardio/avr/libraries
- if [ -n "${TRAVIS_PULL_REQUEST_BRANCH}" ]; then test_branch="${TRAVIS_PULL_REQUEST_BRANCH}"; else test_branch="${TRAVIS_BRANCH}"; fi
- echo "test_branch=${test_branch}"
- git clone -b "${test_branch}" --recursive https://github.com/CapeLeidokos/Leidokos-CMake.git
- cd $HOME
- mkdir kcm_build
- cd kcm_build
- cmake "-DARDUINO_SDK_PATH=${ARDUINO_DIR}" $HOME/hardware/keyboardio/avr/libraries/Leidokos-CMake
- cmake --build . --target nm_diff
notifications:
email:
recipients:
on_failure: always
cache:
directories:
- ${DEPS_DIR}