This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
forked from glium/glium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (64 loc) · 2.86 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
sudo: false
dist: xenial
services:
- xvfb
language: rust
rust:
- nightly
- stable
matrix:
allow_failures:
- rust: nightly
- env: FEATURES='glutin' TEST=1 COVERAGE=1 CHECK=0
env:
global:
- secure: "Ts/4pe5X+GCq2tr88UyXvIciibED0vHaJhQE9gC4OIyJRIM4ZBiNmyVATZi16zWzLPVCkURWBIjMt5G7r7rJ0fwvGvsFUfCMg9if1xYEVgXBw/0FFvgO5CkUR+vK3lD1A9Gew1exCwz/bKz0Vf2NvHcpBdvZ3pUbageLRGKcVH4="
- secure: "Cw+ZqVYKz/mv8yN2dUCJi4DBJImZglaw1GAaddpYBUtdJXgXVVLmQ5i2kWATIyHEQDmMxo9090jrozAkpDKjR2g0BWbywQ1v0G+6HsXkHmxlBkwoqviQK+a6OAEptMg/PeMspu9v+b6StwDX6G/RCv8i782h7xo32b1HpSr8qfE="
- GLIUM_HEADLESS_TESTS=1
matrix:
- FEATURES='' TEST=0 COVERAGE=0 CHECK=0
- FEATURES='glutin' TEST=0 COVERAGE=0 CHECK=1
- FEATURES='glutin' TEST=1 COVERAGE=1 CHECK=0
addons:
apt:
packages:
- libxxf86vm-dev
- libosmesa6-dev
- libcurl4-openssl-dev # for kcov
- libelf-dev # for kcov
- libdw-dev # for kcov
- cmake # for kcov
script:
- cargo build -v --no-default-features --features "$FEATURES"
- if [ "$CHECK" -eq 1 ]; then cargo check --examples --tests --benches --no-default-features --features "$FEATURES"; fi
- if [ "$TEST" -eq 1 ]; then cargo test -v -j 1 --no-default-features --features "$FEATURES"; fi
#- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then cargo test -v --manifest-path macros/Cargo.toml; fi
after_success:
- |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
[ $TRAVIS_RUST_VERSION = nightly ] &&
cargo doc -j 1 --features "glutin cgmath nalgebra" &&
npm install gitbook-cli -g &&
gitbook build ./book &&
mv ./book/_book ./target/doc/book &&
git clone https://github.com/davisp/ghp-import &&
./ghp-import/ghp-import target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
- |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
cargo publish --no-verify --token ${CRATESIO_TOKEN}
- |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
cargo publish --no-verify --token ${CRATESIO_TOKEN} --manifest-path macros/Cargo.toml
- |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
[ "$COVERAGE" -eq 1 ] &&
wget https://github.com/SimonKagstrom/kcov/archive/master.zip &&
unzip master.zip && mv kcov-master kcov && mkdir kcov/build && cd kcov/build &&
cmake .. && make && make install DESTDIR=../built && cd ../.. &&
for file in ./target/debug/*; do ./kcov/built/usr/local/bin/kcov --verify --exclude-pattern=/.cargo,$PWD/target/debug/build,$PWD/tests ./target/kcov ${file}; done &&
./kcov/built/usr/local/bin/kcov --coveralls-id=${TRAVIS_JOB_ID} --merge ./target/kcov-merge ./target/kcov