diff --git a/azure/cargo-check.yml b/azure/cargo-check.yml index 2cb8ded..f788f49 100644 --- a/azure/cargo-check.yml +++ b/azure/cargo-check.yml @@ -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'; @@ -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