Skip to content

Commit

Permalink
Merge pull request #63 from epage/locked
Browse files Browse the repository at this point in the history
fix(lock): Ensure we check lock first
  • Loading branch information
jonhoo authored Oct 17, 2019
2 parents 8698723 + 2d494fe commit 98af6ab
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 98af6ab

Please sign in to comment.