mirror of
https://gitee.com/openharmony/third_party_rust_nom
synced 2024-11-27 01:30:32 +00:00
79 lines
1.8 KiB
YAML
79 lines
1.8 KiB
YAML
language: rust
|
|
sudo: false
|
|
dist: trusty
|
|
cache: cargo
|
|
|
|
rust:
|
|
- nightly
|
|
- beta
|
|
- stable
|
|
|
|
env:
|
|
matrix:
|
|
- FEATURES='--features "regexp regexp_macros"'
|
|
- FEATURES='--features "regexp regexp_macros verbose-errors"'
|
|
|
|
matrix:
|
|
include:
|
|
- rust: nightly
|
|
env: FEATURES='--features "nightly"'
|
|
- rust: nightly
|
|
env: FEATURES='--no-default-features'
|
|
before_script:
|
|
- export PATH=$HOME/.cargo/bin:$PATH
|
|
- which cargo-coveralls || cargo install cargo-travis
|
|
- which cargo-benchcmp || cargo install cargo-benchcmp
|
|
- rust: stable
|
|
env: FEATURES=''
|
|
- rust: stable
|
|
env: DOC_FEATURES='--features "std regexp regexp_macros" --no-default-features'
|
|
before_script:
|
|
- export PATH=$HOME/.cargo/bin:$PATH
|
|
- which rustfmt || cargo install rustfmt
|
|
script:
|
|
- eval cargo fmt -- --write-mode=diff
|
|
- eval cargo doc --verbose $DOC_FEATURES
|
|
|
|
notifications:
|
|
webhooks:
|
|
urls:
|
|
- https://webhooks.gitter.im/e/9c035a194ac4fd4cc061
|
|
on_success: change
|
|
on_failure: always
|
|
on_start: false
|
|
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libcurl4-openssl-dev
|
|
- libelf-dev
|
|
- libdw-dev
|
|
- binutils-dev
|
|
- cmake
|
|
sources:
|
|
- kalakris-cmake
|
|
|
|
script:
|
|
- eval cargo build --verbose $FEATURES
|
|
- eval cargo test --verbose $FEATURES
|
|
|
|
after_success: |
|
|
case "$TRAVIS_RUST_VERSION" in
|
|
nightly)
|
|
cargo bench --verbose
|
|
cargo coveralls --verbose
|
|
cargo bench --verbose
|
|
if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ]; then
|
|
cargo bench > benches-variable
|
|
git fetch
|
|
git checkout master
|
|
cargo bench > benches-control
|
|
cargo benchcmp benches-control benches-variable
|
|
fi
|
|
;;
|
|
*)
|
|
cargo coveralls --verbose
|
|
;;
|
|
esac
|