Skip to content

Commit

Permalink
fix(lock): Ensure we check lock first
Browse files Browse the repository at this point in the history
Also sped it up a bit by running the minimal build.

Fixes #60
  • Loading branch information
Ed Page committed Oct 17, 2019
1 parent c120bd6 commit 2d494fe
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions azure/cargo-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ jobs:
parameters:
rust: ${{ parameters.rust }}
setup: ${{ parameters.setup }}
- script: cargo check --all --bins --examples --tests
displayName: Check compilation w/ default features
- script: cargo check --all --bins --examples --tests --no-default-features
displayName: Check compilation w/ no features
- ${{ if eq('true', parameters.all_features) }}:
- script: cargo check --all --bins --examples --tests --all-features
displayName: Check compilation w/ all features
- bash: |
if git cat-file -e HEAD:Cargo.lock; then
echo 'Found Cargo.lock';
Expand All @@ -33,17 +26,16 @@ jobs:
echo '##vso[task.setvariable variable=is_locked]false';
fi
displayName: Are dependencies locked?
# we only check with --all here since we don't care about the actual
# compilation, just the dependencies + dev-dependencies resolution.
# we _do_ include all features as it may matter though
- script: cargo check --locked
condition: and(succeeded(), eq(variables.is_locked, 'true'))
displayName: Check that Cargo.lock is satisfiable
- script: cargo check --all --bins --examples --tests
displayName: Check compilation w/ default features
- script: cargo check --all --bins --examples --tests --no-default-features
displayName: Check compilation w/ no features
- ${{ if eq('true', parameters.all_features) }}:
- script: cargo check --all --locked --all-features
condition: and(succeeded(), eq(variables.is_locked, 'true'))
displayName: Check that Cargo.lock is satisfiable
- ${{ if ne('true', parameters.all_features) }}:
- script: cargo check --all --locked
condition: and(succeeded(), eq(variables.is_locked, 'true'))
displayName: Check that Cargo.lock is satisfiable
- script: cargo check --all --bins --examples --tests --all-features
displayName: Check compilation w/ all features

- ${{ if ne('false', parameters.benches) }}:
- script: cargo check --benches --all
Expand Down

0 comments on commit 2d494fe

Please sign in to comment.