forked from swift-nav/libsbp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
182 lines (170 loc) · 5.34 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# yamllint disable rule:line-length
---
sudo: required
branches:
only:
- master
- /v\d+\.\d+.\d+/
dist: bionic
language: generic
addons:
apt:
packages:
- build-essential
- doxygen
- cmake
- lcov
- gradle
- libgmp-dev
cache:
apt: true
cargo: true
directories:
- .stack-work/
- $HOME/.stack/
- $HOME/.cargo/
- $HOME/.docker-cache/
matrix:
include:
- env:
- TRAVIS_TARGET=python-haskell
language: python
python: 3.7-dev
before_install:
- sudo apt-get -qq update
- sudo apt-get install gcc python2.7 python2.7-dev
# https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/
- sudo apt-get install software-properties-common
- sudo add-apt-repository -y ppa:deadsnakes/ppa
- sudo apt-get install python3.5 python3.5-dev
- sudo apt-get install python3.8 python3.8-dev
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo pip install tox
script:
- ./scripts/travis_python_haskell.bash
- env:
- TRAVIS_TARGET=default JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
before_install:
- mkdir -p $HOME/texlive && curl -L https://github.com/urdh/texlive-blob/releases/download/20160619/texlive.tar.xz | tar -JxC $HOME/texlive
- export PATH="$PATH:$HOME/texlive/bin/x86_64-linux"
# Install stack
- mkdir -p $HOME/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $HOME/.local/bin '*/stack'
# Install node 8; from https://github.com/nodejs/nan/blob/master/.travis.yml
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install 8
- npm install npm
- mv node_modules npm
- npm/.bin/npm --version
- npm/.bin/npm install
- sudo add-apt-repository -y ppa:openjdk-r/ppa
- sudo apt-get -qq update
- sudo apt-get install -y openjdk-8-jdk --no-install-recommends
- sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
- sudo pip install --upgrade Sphinx
- npm install -g mocha
- npm install
script:
- make test-c
- make test-haskell
- make test-java
- make test-javascript
- env:
- TRAVIS_TARGET=codecov
- CMAKEFLAGS="-DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug"
script:
- make test-c
after_success:
bash <(curl -s https://codecov.io/bash) -s c/build || echo "Codecov did not collect coverage reports";
- env:
- TRAVIS_TARGET=rust
before_install:
- sudo apt-get -qq update
- sudo apt-get install libudev-dev
language: rust
rust:
- stable
script:
- make test-rust
- env:
- TRAVIS_TARGET=benchmark
- VIA_DOCKER=y
language: python
python:
- "3.7"
before_install:
- source ./scripts/travis_benchmark_install.bash
script:
- ./scripts/travis_benchmark.bash
- env:
- TRAVIS_TARGET=osx
os: osx
osx_image: Xcode 8.3.3
language: rust
script: |
set -ex
cargo build --all --release
strip target/release/{sbp2json,json2sbp,json2json}
tar -C "target/release" -czf sbp_osx_tools.tar.gz \
sbp2json json2sbp json2json
VERSION="$(git describe --always --tags --dirty)"
BUILD_TRIPLET="$(cc -dumpmachine)"
mv sbp_osx_tools.tar.gz "sbp_tools-${VERSION}-${BUILD_TRIPLET}.tar.gz"
ls -l
set +ex
addons:
homebrew:
packages:
- cmake
- env:
- TRAVIS_TARGET=windows
os: windows
language: rust
script: |
cargo build --all --release
cd target/release
strip sbp2json.exe json2sbp.exe json2json.exe
7z a -tzip ../../sbp_windows_tools.zip \
sbp2json.exe json2sbp.exe json2json.exe
cd ../..
VERSION="$(git describe --always --tags --dirty)"
BUILD_TRIPLET="$(clang -dumpmachine)"
mv sbp_windows_tools.zip "sbp_tools-${VERSION}-${BUILD_TRIPLET}.zip"
ls -l
_github_api_key: &_github_api_key
api_key:
secure: "WDZRT7VevzQidPo8Mn1ozV6azwNFe7qGwKbLCb8rmKpPmiF+wcQ3KrhTnGj0EmqGqQ2q1c3UZzVCr+nLhLvIFLhkvNK42bs8Byc+HolKNX/diPAlB/mczGHI08rV4EJFmJL56vopdoafOAsqtZBnD4hZ8BDETNqMyJefo70pyY8="
deploy:
- provider: releases
file_glob: true
file: "haskell/sbp_tools_haskell-*.tar.gz"
skip_cleanup: true
"on":
tags: true
condition: "$TRAVIS_TARGET = python-haskell"
<<: *_github_api_key
- provider: releases
file_glob: true
file: "rust/sbp_tools-*.tar.gz"
skip_cleanup: true
"on":
tags: true
condition: "$TRAVIS_TARGET = benchmark"
<<: *_github_api_key
- provider: releases
file_glob: true
file: "sbp_tools-*.tar.gz"
skip_cleanup: true
"on":
tags: true
condition: "$TRAVIS_TARGET = osx"
<<: *_github_api_key
- provider: releases
file_glob: true
file: "sbp_tools-*.zip"
skip_cleanup: true
"on":
tags: true
condition: "$TRAVIS_TARGET = windows"
<<: *_github_api_key
...