forked from input-output-hk/rust-byron-cardano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (46 loc) · 1.38 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
language: rust
cache: cargo
matrix:
include:
- rust: stable
os: linux
env: CHECK_RUSTFMT="true"
# - rust: stable
# os: windows
# env: CARDANO_C="false" CARDANO_WASM="false" RUN_TEST="true"
- rust: stable
os: osx
env: CARDANO_C="false" CARDANO_WASM="false" RUN_TEST="true"
- rust: stable
os: linux
env: CARDANO_C="true" CARDANO_WASM="false" RUN_TEST="true"
- rust: nightly
os: linux
env: CARDANO_C="true" CARDANO_WASM="false" RUN_TEST="true"
- rust: nightly
env: TARGET="wasm32-unknown-unknown" CARDANO_C="false" CARDANO_WASM="true" RUN_TEST="false"
os: linux
allow_failures:
# - rust: stable
# os: windows
# env: CARDANO_C="false" CARDANO_WASM="false" RUN_TEST="true"
before_script:
- |
if [ "${CARDANO_WASM}" = "true" ]; then
rustup target add ${TARGET} --toolchain nightly
fi
- |
if [ "${CHECK_RUSTFMT}" = "true" ]; then
rustup component add rustfmt-preview
fi
script:
- |
if [ "${CHECK_RUSTFMT}" = "true" ]; then
cargo fmt -- --check
fi
- if [ "${RUN_TEST}" = "true" ]; then cargo build --verbose --all && cargo test --verbose --all; fi
- if [ "${CARDANO_C}" = "true" ]; then ./cardano-c/test.sh; fi
- |
if [ "${CARDANO_WASM}" = "true" ]; then
cargo +nightly build --target ${TARGET} --release --verbose --package cardano
fi