forked from facebookexperimental/MIRAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (40 loc) · 1.1 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
os:
- linux
- osx
- windows
language: rust
rust:
- nightly-2021-06-25
install:
# install rustc-dev
- rustup component add rustc-dev
# install formatter
- rustup component add rustfmt
# install linter
- rustup component add clippy
# install llvm-tools
- rustup component add llvm-tools-preview
# install audit
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then cargo install cargo-audit; fi
# install z3
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then export RUSTFLAGS='-Clink-arg=-L./binaries -Clink-arg=-lstdc++'; fi
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then cp binaries/libz3.dylib /usr/local/lib; fi
- if [ ${TRAVIS_OS_NAME} == "windows" ]; then mkdir -p target/debug; cp binaries/libz3.dll target/debug; cp binaries/libz3.lib target/debug; fi
script:
# Exit immediately if a command exits with a non-zero status.
- set -e
# Lint style checks
- |
if [ ${TRAVIS_OS_NAME} == "osx" ]
then
# Audit dependencies
cargo audit
# Run format checks
cargo fmt --all -- --check
# Run lint checks
cargo clippy -- -D warnings
fi
# Build
- cargo build
# Run unit and integration tests
- RUST_BACKTRACE=1 cargo test