bdk/.travis.yml

61 lines
2.4 KiB
YAML
Raw Normal View History

2020-02-03 18:31:12 +01:00
language: rust
rust:
- stable
2020-08-06 18:46:20 +02:00
env:
global:
jobs:
- TARGET=x86_64-unknown-linux-gnu CHECK_FMT=1
- TARGET=x86_64-unknown-linux-gnu RUN_TESTS=1
- TARGET=x86_64-unknown-linux-gnu FEATURES=minimal NO_DEFAULT_FEATURES=1
- TARGET=x86_64-unknown-linux-gnu FEATURES=minimal,esplora NO_DEFAULT_FEATURES=1
- TARGET=x86_64-unknown-linux-gnu FEATURES=key-value-db NO_DEFAULT_FEATURES=1
- TARGET=x86_64-unknown-linux-gnu FEATURES=electrum NO_DEFAULT_FEATURES=1
- TARGET=x86_64-unknown-linux-gnu FEATURES=cli-utils,esplora NO_DEFAULT_FEATURES=1
- TARGET=x86_64-unknown-linux-gnu FEATURES=compiler NO_DEFAULT_FEATURES=1 RUN_TESTS=1 # Test the `miniscriptc` example
2020-08-06 18:46:20 +02:00
- TARGET=wasm32-unknown-unknown FEATURES=cli-utils,esplora NO_DEFAULT_FEATURES=1
before_script:
2020-08-06 18:46:20 +02:00
- |
if [[ "$TARGET" = "wasm32-unknown-unknown" ]]; then
# Install a recent version of clang that supports wasm32
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" || exit 1
sudo apt-get update || exit 1
sudo apt-get install -y clang-10 libc6-dev-i386 || exit 1
export CC="clang-10"
export CFLAGS="-I/usr/include"
fi
- |
if [[ $CHECK_FMT -eq 1 ]]; then
rustup component add rustfmt
fi
- rustup target add "$TARGET"
2020-02-03 18:31:12 +01:00
script:
2020-08-06 18:46:20 +02:00
- |
if [[ $CHECK_FMT -eq 1 ]]; then
cargo fmt -- --check || exit 1
fi
- |
if [[ $RUN_TESTS -eq 1 ]]; then
CMD=test
else
CMD=build
fi
- cargo $CMD --verbose --target=$TARGET --features=$FEATURES $( (( NO_DEFAULT_FEATURES == 1 )) && printf %s '--no-default-features' )
# - cargo fmt -- --check --verbose
# - cargo test --verbose --all
# - cargo build --verbose --all
# - cargo build --verbose --no-default-features --features=minimal
# - cargo build --verbose --no-default-features --features=minimal,esplora
# - cargo build --verbose --no-default-features --features=key-value-db
# - cargo build --verbose --no-default-features --features=electrum
# - CC="clang-10" CFLAGS="-I/usr/include" cargo build --verbose --no-default-features --features=cli-utils,esplora --target=wasm32-unknown-unknown
2020-02-03 18:31:12 +01:00
notifications:
email: false
2020-02-07 12:27:10 +01:00
before_cache:
- rm -rf "$TRAVIS_HOME/.cargo/registry/src"
cache: cargo