Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified CI and patched tarpaulin issue with cross.
- Loading branch information
1 parent
8125bfb
commit 0059760
Showing
4 changed files
with
44 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
if [[ ! -z $COVERAGE ]]; then | ||
# Uncomment the following line for coveralls.io | ||
# cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID | ||
|
||
# Uncomment the following two lines create and upload a report for codecov.io | ||
cargo tarpaulin --out Xml | ||
bash <(curl -s https://codecov.io/bash) | ||
echo "Uploaded code coverage" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
if [[ ! -z $COVERAGE ]]; then | ||
cargo install cargo-tarpaulin -f | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# Detect our build command if we are on travis or not (so we can test locally). | ||
if [ -z $CI ] || [ ! -z $DISABLE_CROSS ]; then | ||
# Not on CI or explicitly disabled cross, use cargo | ||
CARGO=cargo | ||
else | ||
# On CI, use cross. | ||
CARGO=cross | ||
CARGO_TARGET="--target $TARGET" | ||
fi | ||
|
||
$CARGO clean | ||
$CARGO build $CARGO_TARGET --all-features | ||
if [ -z $DISABLE_TESTS ]; then | ||
$CARGO test $CARGO_TARGET --all-features | ||
fi |