forked from scanse/sweep-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (93 loc) · 3.26 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
language: generic
sudo: required
dist: trusty
services:
- docker
matrix:
fast_finish: true
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:webupd8team/java'
packages: ['g++-6', 'cmake', 'python3', 'python3-pip', 'python3-setuptools', 'nodejs', 'npm', 'libsfml-dev', 'libprotobuf-dev', 'protobuf-compiler', 'libzmq-dev']
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6'
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:webupd8team/java'
packages: ['g++-5', 'cmake', 'python3', 'python3-pip', 'python3-setuptools', 'nodejs', 'npm', 'libsfml-dev', 'libprotobuf-dev', 'protobuf-compiler', 'libzmq-dev']
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5'
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-3.9
- sourceline: 'ppa:webupd8team/java'
packages: ['clang-3.9', 'cmake', 'python3', 'python3-pip', 'python3-setuptools', 'nodejs', 'npm', 'libsfml-dev', 'libprotobuf-dev', 'protobuf-compiler', 'libzmq-dev']
env: CCOMPILER='clang-3.9' CXXCOMPILER='clang++-3.9'
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
- sourceline: 'ppa:webupd8team/java'
packages: ['clang-4.0', 'cmake', 'python3', 'python3-pip', 'python3-setuptools', 'nodejs', 'npm', 'libsfml-dev', 'libprotobuf-dev', 'protobuf-compiler', 'libzmq-dev']
env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0'
- os: osx
osx_image: xcode8.2
node_js: 4
env: CCOMPILER='clang' CXXCOMPILER='clang++'
- os: osx
osx_image: xcode8.2
node_js: 6
env: CCOMPILER='clang' CXXCOMPILER='clang++'
before_install:
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10; fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then brew update && brew install python3 && brew cask install java; fi
install:
# Make sure building libsweep works
- pushd libsweep
- mkdir -p build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Debug
- cmake --build .
# Then build and install dummy library to test bindings against without device attached
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DDUMMY=On
- cmake --build .
- sudo cmake --build . --target install
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo ldconfig; fi
- popd
# Install Python bindings
- pushd sweeppy
- sudo python2 setup.py install
- sudo python3 setup.py install
- popd
# Build Java Bindings
- ./travis/java-run-task.sh assemble
script:
# Test libsweep examples against the dummy library
- pushd libsweep/examples
- mkdir build
- cd build
- cmake ..
- cmake --build .
- ./example-c /dev/ttyUSB0
- ./example-c++ /dev/ttyUSB0
- popd
# Test SweepPy bindings against the dummy library
- pushd sweeppy
- python2 -m sweeppy /dev/ttyUSB0
- python3 -m sweeppy /dev/ttyUSB0
- popd
# Test SweepJs bindings against the dummy library
- pushd sweepjs
- npm install
- popd
# Test JSweep bindings against the dummy library
- ./travis/java-run-task.sh check