-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
79 lines (68 loc) · 2.13 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
# sudo: true
dist: xenial
language: rust
cache:
cargo: true
apt: true
rust:
- stable
- beta
- nightly
addons:
apt:
sources:
# - sourceline: 'ppa:chris-lea/libsodium'
# - sourceline: 'ppa:alexhuang/libzmq'
packages:
# Cargo coverage dependencies
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
# Dependencies for Mjolnir
- protobuf-compiler
- libprotobuf-dev
- libsodium-dev
- libzmq3-dev
install:
# - cargo install -f cargo-travis
- export PATH=$HOME/.cargo/bin:$PATH
script:
- cargo test --all --verbose
# - if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then cargo coveralls --exclude-pattern tests/,mjolnir-api/src/proto/mjolnir.rs,mjolnir-api/src/proto/plugin.rs,mjolnir-api/src/proto/agent.rs --all; fi
# TODO : Re-enable functional builds
jobs:
include:
- stage: functional
script:
- sudo apt remove --purge lxd
- sudo apt-get install snapd # > /dev/null 2>&1
- sudo snap install lxd --channel=stable # > /dev/null 2>&1
- export PATH=/snap/bin:${PATH}
- sudo /snap/bin/lxd waitready --timeout 60
- sudo /snap/bin/lxd init --auto
- sudo /snap/bin/lxc network create testbr0 ipv6.address=none
- sudo /snap/bin/lxc network detach-profile lxdbr0 default eth0
- sudo /snap/bin/lxc network attach-profile testbr0 default eth0
- sudo chmod 777 /var/snap/lxd/common/lxd/unix.socket
- sudo usermod -a -G lxd travis
- sudo su travis -c 'PATH=/snap/bin/:${PATH} VERBOSE=true tests/run.sh'
# after_success: |
# if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
# cargo coveralls --exclude-pattern tests/,mjolnir-api/src/proto/mjolnir.rs,mjolnir-api/src/proto/plugin.rs,mjolnir-api/src/proto/agent.rs --all
# fi
# Could do this to provide trusty debs
# before_deploy: |
# test $TRAVIS_TEST_RESULT = 0 \
# test $TRAVIS_RUST_VERSION = "stable" \
# test $TRAVIS_TAG \
# cargo install cargo-deb &&
# cargo deb
# deploy:
# provider: releases
# api_key: "GITHUB OAUTH TOKEN"
# file: "/target/release/
# skip_cleanup: true
# on:
# tags: true
# rust: stable