forked from lumol-org/lumol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (73 loc) · 1.98 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
language: rust
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- kalakris-cmake
packages:
- g++-4.9
- cmake
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- texlive-latex-recommended
- texlive-latex-extra
- texlive-fonts-recommended
- latexmk
rust:
- stable
- beta
os:
- linux
- osx
install:
- source scripts/ci/setup-travis.sh
- ./scripts/ci/install-travis.sh
# Clean any cached test executable
- mkdir -p target/debug/deps/ # just in case
- find target/debug/deps/ ! -name "lib*" -type f -delete
script:
- cd $TRAVIS_BUILD_DIR
# Run unit tests and doc tests in debug mode
- cargo test --all --lib -- --test-threads=2
- cargo test --all --doc -- --test-threads=2
# lumol-input also has integration tests
- cargo test -p lumol-input --tests -- --test-threads=2
# Run all tests in release mode
- cargo test --all --release -- --test-threads=2
# Check thet benchmarks compile and run
- cargo bench -- --test
# Check if tutorials compile
- |
for tutorial in tutorials/*/
do
cd $tutorial
cargo build
cd -
done
# Misc style checking
- ./scripts/ci/check-whitespaces.py
# Generate documentation and place it in target/gh-pages
- ./scripts/ci/generate-docs.sh
# Generate and publish coverage
- |
if ${DO_COVERAGE}; then
for test in $(find target/debug/ -maxdepth 1 -executable -type f); do
kcov --include-pattern=$(pwd) --exclude-pattern=target --exclude-pattern=tutorials target/kcov $test
done
bash <(curl -s https://codecov.io/bash) -s target/kcov
fi
deploy:
provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
local_dir: target/gh-pages
email: [email protected]
name: Lumol Bot
on:
branch: master
condition: "${TRAVIS_OS_NAME} == linux && ${TRAVIS_RUST_VERSION} == stable"
cache:
directories:
- $HOME/local/bin