-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI for v2-master #1673
Merged
CI for v2-master #1673
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
name: $(Build.BuildId) | ||
trigger: | ||
# Always build master | ||
- v2-master | ||
pr: | ||
# Enable building pull requests. | ||
- v2-master | ||
stages: | ||
- stage: Testing | ||
jobs: | ||
- job: | ||
variables: | ||
rust: 1.36.0 | ||
strategy: | ||
matrix: | ||
Windows 32-bit (MSVC): | ||
image: vs2017-win2016 | ||
target: i686-pc-windows-msvc | ||
Windows 64-bit (MSVC): | ||
image: vs2017-win2016 | ||
target: x86_64-pc-windows-msvc | ||
Windows 32-bit (MinGW): | ||
image: vs2017-win2016 | ||
target: i686-pc-windows-gnu | ||
Windows 64-bit (MinGW): | ||
image: vs2017-win2016 | ||
target: x86_64-pc-windows-gnu | ||
pool: | ||
vmImage: $(image) | ||
steps: | ||
- checkout: self | ||
fetchDepth: 1 | ||
path: clap | ||
displayName: Checkout repository | ||
- task: Cache@2 | ||
inputs: | ||
key: cargo | "$(rust)" | $(target) | Cargo.toml | ||
path: C:\Rust\.cargo | ||
displayName: Caching cargo | ||
- task: Cache@2 | ||
inputs: | ||
key: compiled | "$(rust)" | $(target) | Cargo.toml | ||
path: target | ||
displayName: Caching compiled | ||
- script: rustup default $(rust)-$(target) | ||
displayName: Install rust | ||
- script: cargo test --no-default-features | ||
displayName: Test without default features | ||
env: | ||
RUST_BACKTRACE: full | ||
- script: cargo test --features "yaml unstable" | ||
displayName: Test with most features | ||
env: | ||
RUST_BACKTRACE: full | ||
- script: | | ||
rmdir /Q /S C:\Rust\.cargo\registry\src | ||
rmdir /Q /S target\.rustc_info.json | ||
rmdir /Q /S target\debug\examples | ||
rmdir /Q /S target\debug\incremental | ||
displayName: Cleaning for cache | ||
continueOnError: true |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,67 +1,66 @@ | ||
sudo: true | ||
os: linux | ||
language: rust | ||
cache: | ||
directories: | ||
- $HOME/.cargo | ||
- $HOME/.rustup | ||
cache: cargo | ||
before_cache: | ||
- rm -rf /home/travis/.cargo/registry | ||
rust: | ||
- nightly | ||
- nightly-2019-06-18 | ||
- beta | ||
- stable | ||
- 1.33.0 | ||
matrix: | ||
allow_failures: | ||
- rust: nightly | ||
nightly-2019-06-18: | ||
- script: cargo clippy | ||
before_script: | ||
- | | ||
pip install git+git://github.com/kbknapp/travis-cargo.git --user && | ||
export PATH=$HOME/.local/bin:$PATH | ||
- | | ||
if [[ "$TRAVIS_RUST_VERSION" == "1.13.0" ]]; then | ||
echo "Old Rust detected, removing version-sync dependency" | ||
sed -i "/^version-sync =/d" Cargo.toml | ||
rm "tests/version-numbers.rs" | ||
fi | ||
- find target/debug -type f -maxdepth 1 -delete | ||
- rm -rf target/.rustc_info.json | ||
- rm -rf target/debug/examples | ||
- rm -rf target/debug/incremental | ||
- rm -rf target/tests/target/debug/incremental | ||
- rm -rf target/tests/target/debug/deps/{clap*, trybuild*} | ||
- rm -rf target/debug/{deps,.fingerpint}/clap* | ||
- find target/debug/deps -name "clap*" -exec rm -rf {} + | ||
- ls -1 examples/ | sed -e 's/\.rs$//' | xargs -I "{{}}" find target/debug/deps -name "{{}}*" -exec rm -rf {} + | ||
- ls -1 tests/ | sed -e 's/\.rs$//' | xargs -I "{{}}" find target/debug/deps -name "{{}}*" -exec rm -rf {} + | ||
rust: stable | ||
branches: | ||
only: | ||
# Always build master & Enable building pull requests. | ||
- v2-master | ||
jobs: | ||
allow_failures: | ||
- rust: nightly | ||
- env: | ||
- SHARD=coverage | ||
fast_finish: true | ||
include: | ||
- os: osx | ||
rust: 1.36.0 | ||
- rust: 1.36.0 | ||
- {} | ||
- rust: beta | ||
- rust: nightly | ||
- env: | ||
- SHARD=lint | ||
before_script: | ||
- rustup component add clippy | ||
- rustup component add rustfmt | ||
script: | ||
- echo "Checking codebase with Clippy release `cargo clippy --version`." | ||
- cargo clippy --lib --features "yaml unstable" | ||
- cargo clippy --tests --examples --features "yaml unstable" | ||
- cargo fmt -- --check | ||
- rust: nightly | ||
env: | ||
- SHARD=bench | ||
script: | ||
- cargo bench | ||
- env: | ||
- SHARD=coverage | ||
addons: | ||
apt: | ||
packages: | ||
- libssl-dev | ||
- cmake | ||
- pkg-config | ||
- zlib1g-dev | ||
update: true | ||
before_script: | ||
- cargo install cargo-tarpaulin | ||
script: | ||
- cargo tarpaulin --features "yaml unstable" --ciserver travis-ci --coveralls $TRAVIS_JOB_ID | ||
script: | ||
- | | ||
travis-cargo --only stable test -- --verbose --no-default-features && | ||
travis-cargo --skip nightly test -- --verbose --features "yaml unstable" && | ||
travis-cargo --only nightly test -- --verbose --features "yaml unstable nightly" && | ||
travis-cargo --only nightly bench -- --no-run | ||
addons: | ||
apt: | ||
packages: | ||
- binutils-dev | ||
- libcurl4-openssl-dev | ||
- libelf-dev | ||
- libdw-dev | ||
- libiberty-dev | ||
- cmake | ||
- gcc | ||
- zlib1g-dev | ||
after_success: | ||
- | | ||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && | ||
tar xzf master.tar.gz && | ||
cd kcov-master && | ||
mkdir build && | ||
cd build && | ||
cmake .. && | ||
make && | ||
sudo make install && | ||
cd ../.. && | ||
rm -rf kcov-master && | ||
cargo clean && | ||
cargo test --no-run --features "yaml unstable" && | ||
for file in target/debug/*-*; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo --verify "target/cov/$(basename $file)" "$file"; done && | ||
kcov --coveralls-id=$TRAVIS_JOB_ID --merge target/cov target/cov/* && | ||
echo "Uploaded code coverage" | ||
env: | ||
global: | ||
- TRAVIS_CARGO_NIGHTLY_FEATURE=lints | ||
- secure: JLBlgHY6OEmhJ8woewNJHmuBokTNUv7/WvLkJGV8xk0t6bXBwSU0jNloXwlH7FiQTc4TccX0PumPDD4MrMgxIAVFPmmmlQOCmdpYP4tqZJ8xo189E5zk8lKF5OyaVYCs5SMmFC3cxCsKjfwGIexNu3ck5Uhwe9jI0tqgkgM3URA= | ||
- cargo test --no-default-features | ||
- cargo test --features yaml unstable | ||
notifications: | ||
email: false |
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
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 |
---|---|---|
|
@@ -8,20 +8,21 @@ use clap::{App, Arg}; | |
use test::Bencher; | ||
|
||
macro_rules! create_app { | ||
() => ({ | ||
() => {{ | ||
App::new("claptests") | ||
.version("0.1") | ||
.about("tests clap library") | ||
.author("Kevin K. <[email protected]>") | ||
.args_from_usage("-f --flag 'tests flags' | ||
.version("0.1") | ||
.about("tests clap library") | ||
.author("Kevin K. <[email protected]>") | ||
.args_from_usage( | ||
"-f --flag 'tests flags' | ||
-o --option=[opt] 'tests options' | ||
[positional] 'tests positional'") | ||
}) | ||
[positional] 'tests positional'", | ||
) | ||
}}; | ||
} | ||
|
||
#[bench] | ||
fn build_app(b: &mut Bencher) { | ||
|
||
b.iter(|| create_app!()); | ||
} | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's theoretically a breaking change, but 1.33 if pretty old and it's unlikely that many people still use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not actually a breaking change since we hadn't released the 1.33 version bump. Also, in README, we say that Clap supports stable minus 2 versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a breaking change. Though note we won't be releasing a new 2.0 version unless it's an emergency