-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
55 lines (47 loc) · 1.9 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
sudo: required
services:
- docker
language: rust
matrix:
fast_finish: true
include:
- rust: 1.33.0
- rust: stable
- rust: beta
- rust: nightly
- rust: stable
env: COLLECTD_PATH=./collectd
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
- ubuntu-toolchain-r-test
packages:
- cmake
- llvm-5.0-dev
- clang-5.0
- libclang-5.0-dev
# On aarch64 machines, c_char = u8 instead of i8
- rust: stable
env: CROSS_TARGET=aarch64-unknown-linux-gnu COLLECTD_VERSION=5.5
# These are the full blown integration tests
- rust: stable
env: UBUNTU_VERSION=14.04 COLLECTD_VERSION=5.4
- rust: stable
env: UBUNTU_VERSION=16.04 COLLECTD_VERSION=5.5
- rust: stable
env: UBUNTU_VERSION=18.04 COLLECTD_VERSION=5.7
- rust: stable
env: UBUNTU_VERSION=19.10 COLLECTD_VERSION=5.7
- rust: stable
env: UBUNTU_VERSION=20.04 COLLECTD_VERSION=5.7
before_install:
- if [ ! -z $COLLECTD_PATH ]; then sudo apt-get update && sudo apt-get install -qq --no-install-recommends autotools-dev libltdl-dev && git clone https://github.com/collectd/collectd.git $COLLECTD_PATH; fi
script:
- COLLECTD_VERSION=5.5 cargo build --all
- if [ ! $TRAVIS_RUST_VERSION = "1.33.0" ]; then COLLECTD_VERSION=5.5 cargo test --all; fi;
- if [ ! -z $COLLECTD_PATH ]; then cargo test --features bindgen --all; fi;
- if [ ! -z $CROSS_TARGET ]; then cargo install cross && cross test --target $CROSS_TARGET; fi;
- if [ ! -z $UBUNTU_VERSION ]; then docker build -t collectd-rust-plugin --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg COLLECTD_VERSION=${COLLECTD_VERSION} .; fi;
- if [ ! -z $UBUNTU_VERSION ]; then docker run -e UBUNTU_VERSION=$UBUNTU_VERSION -ti collectd-rust-plugin bash -c "cd /tmp && COLLECTD_VERSION=${COLLECTD_VERSION} ci/test.sh"; fi;