forked from stratis-storage/stratisd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (96 loc) · 3.23 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
os: linux
group: edge
addons:
apt:
packages:
- libdbus-1-dev
- libudev-dev
- libdbus-glib-1-dev
# needed for i686-unknown-linux-gnu target
- gcc-multilib
- python3-pyudev
language: rust
matrix:
fast_finish: true
allow_failures:
# Allow audit task to fail
- env: TASK=audit
include:
# MANDATORY CHECKS USING CURRENT DEVELOPMENT COMPILER
# rustfmt
- rust: 1.40.0
before_script:
- rustup component add rustfmt
env: TASK=fmt-travis
# clippy
- rust: 1.40.0
before_script:
- rustup component add clippy
env: TASK=clippy
# MANDATORY TESTING USING LOWEST SUPPORTED COMPILER
# tests
- rust: 1.38.0
env: TASK=test
# release
- rust: 1.38.0
env: TASK=release
# MANDATORY TESTING ON STABLE
# compile
- rust: stable
env: TASK=build TARGET=x86_64-unknown-linux-gnu
# compile with no defaults enabled
- rust: stable
env: TASK=build-no-default TARGET=x86_64-unknown-linux-gnu
# compile on a 32-bit system
- rust: stable
env: TASK=build TARGET=i686-unknown-linux-gnu PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig/
install:
- rustup target add $TARGET
- sudo dpkg --add-architecture i386
- sudo apt-get update
- sudo apt-get install -y gcc-multilib libdbus-1-dev:i386 libdbus-glib-1-dev:i386 libglib2.0-dev:i386 libudev-dev:i386
# Build docs
- rust: stable
env: TASK=docs-travis
# test
- rust: stable
env: TASK=test
# destructive tests that can be run on Travis
- rust: stable
sudo: required
script: sudo PATH=${TRAVIS_HOME}/.cargo/bin:$PATH make -f Makefile test-travis
# release
- rust: stable
env: TASK=release
# MANDATORY PYTHON CHECKS
# Run pylint, Python linter, on any Python test code
- language: python
python: "3.7"
install: pip3 install -r tests/client-dbus/requirements.txt
before_script:
- cd tests/client-dbus
env: TASK=lint
# Format any Python test code using yapf
- language: python
python: "3.7"
install: pip3 install -r tests/client-dbus/requirements.txt
before_script:
- cd tests/client-dbus
env: TASK=fmt-travis
# INTERMITTENTLY ALLOWED FAILURES
# Allowed if a failure occurs after a new Rust release until the
# failure is addressed.
# Run clippy on rust beta, in order to be good Rustaceans.
- rust: beta
before_script:
- rustup component add clippy
env: TASK=clippy
# ALLOWED FAILURES
# Run audit on Rust stable. Make it an allowed failure, because:
# * It takes 9 minutes, the longest of any task.
# * It should be an advisory, and should not gate our development.
- rust: stable
env: TASK=audit
branches:
only: develop
script: make -f Makefile $TASK