forked from aldanor/hdf5-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
126 lines (122 loc) · 3.3 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
sudo: false
language: rust
notifications:
email:
on_success: never
addons:
apt:
packages:
- pkg-config
matrix:
include:
- name: xenial-stable-conda-1.10.4
os: linux
dist: xenial
rust: stable
env:
- H5_CONDA=1.10.4
- name: xenial-beta-apt-1.8.13
os: linux
dist: xenial
rust: beta
addons:
apt:
packages:
- libhdf5-dev
env:
- HDF5_VERSION=1.8.16
- name: trusty-nightly-apt-1.8.11
os: linux
dist: trusty
rust: nightly
addons:
apt:
packages:
- libhdf5-serial-dev
- name: macos-stable-brew-1.8.*
os: osx
rust: stable
env:
- H5_BREW=1.8
- name: macos-beta-brew-1.10.*
os: osx
rust: beta
env:
- H5_BREW=1.10
- name: macos-nightly-conda-1.8.9
os: osx
rust: nightly
env:
- H5_CONDA=1.8.9
- HDF5_VERSION=1.8.9
before_script:
- |
if [ $TRAVIS_RUST_VERSION = "nightly" ]; then
rustup component add clippy --toolchain=nightly || true;
fi
- cd $TRAVIS_BUILD_DIR
script:
- |
if { [ $TRAVIS_RUST_VERSION = "nightly" ] && which cargo-clippy >/dev/null; }; then
if rustup component list | grep -E "clippy.+installed"; then
cargo clippy -v;
fi
fi
- cargo clean
- cargo build -vv
- cargo test -v --no-run --all --exclude hdf5-derive
- cargo test -v --all --exclude hdf5-derive
- cargo clean
- cargo test -v -p hdf5-derive
before_install:
- |
if [ `uname` = "Darwin" ] && [ ! -z "$H5_BREW" ]; then
brew update >/dev/null;
brew tap homebrew/science;
brew install hdf5@${H5_BREW};
# https://github.com/laumann/compiletest-rs/issues/179
export DYLD_LIBRARY_PATH="/usr/lib:/usr/local/lib";
brew unlink jpeg giflib libpng libtiff
fi
- |
if [ ! -z "$H5_CONDA" ]; then
if [ `uname` = "Darwin" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
# note: this is only required for older HDF5 installations on OS X
export DYLD_FALLBACK_LIBRARY_PATH="$HOME/miniconda/envs/testenv/lib";
# https://github.com/laumann/compiletest-rs/issues/179
export DYLD_LIBRARY_PATH="$HOME/miniconda/envs/testenv/lib";
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda info -a;
conda create -q -n testenv -c anaconda hdf5=${H5_CONDA};
export HDF5_DIR="$HOME/miniconda/envs/testenv";
export RUSTFLAGS="-C link-args=-Wl,-rpath,$HOME/miniconda/envs/testenv/lib";
fi
- |
if [ $TRAVIS_OS_NAME = "linux" ]; then
pkg-config hdf5 --modversion || true;
fi
- find /usr -name '*hdf5*' || true
- find /usr -name 'H5*.h' || true
cache:
directories:
- /home/travis/.cargo
before_cache:
- rm -rf /home/travis/.cargo/registry
before_deploy:
- cargo doc --no-deps
- echo '<meta http-equiv=refresh content=0;url=hdf5/index.html>' > target/doc/index.html
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: target/doc
on:
branch: master
condition: "$TRAVIS_RUST_VERSION = stable && $TRAVIS_OS_NAME = linux"