Skip to content
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

A better story for canary jobs (yellow CI) #33

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
19 changes: 15 additions & 4 deletions azure/cargo-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ parameters:
rust: stable
allow_fail: false
setup: []
fail_all: false
jonhoo marked this conversation as resolved.
Show resolved Hide resolved

jobs:
- job: ${{ parameters.name }}
${{ if eq(parameters.rust, 'stable') }}:
displayName: cargo clippy
${{ if eq(parameters.fail_all, 'true') }}:
displayName: cargo clippy -- -D warnings
${{ if ne(parameters.fail_all, 'true') }}:
displayName: cargo clippy
${{ if ne(parameters.rust, 'stable') }}:
displayName: cargo +${{ parameters.rust }} clippy
${{ if eq(parameters.fail_all, 'true') }}:
displayName: cargo +${{ parameters.rust }} clippy -- -D warnings
${{ if ne(parameters.fail_all, 'true') }}:
displayName: cargo +${{ parameters.rust }} clippy
continueOnError: ${{ parameters.allow_fail }}
pool:
vmImage: ubuntu-16.04
Expand All @@ -19,5 +26,9 @@ jobs:
setup: ${{ parameters.setup }}
components:
- clippy
- script: cargo clippy --all
displayName: Run clippy
- ${{ if eq(parameters.fail_all, 'true') }}:
- script: cargo clippy --all -- -D warnings
displayName: Run strict clippy
- ${{ if ne(parameters.fail_all, 'true') }}:
- script: cargo clippy --all
displayName: Run strict clippy
3 changes: 3 additions & 0 deletions azure/stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
prefix: ''
envs: {}
setup: []
smoketests: true

stages:
# the format here is so that we can have _two_ instances of this whole
Expand Down Expand Up @@ -46,6 +47,7 @@ stages:
parameters:
envs: ${{ parameters.envs }}
setup: ${{ parameters.setup }}
smoketests: ${{ parameters.smoketests }}
- stage: ${{ format('{0}style', parameters.prefix) }}
${{ if ne(parameters.prefix, '') }}:
displayName: ${{ format('Style linting ({0})', parameters.prefix) }}
Expand All @@ -56,6 +58,7 @@ stages:
- template: style.yml
parameters:
setup: ${{ parameters.setup }}
smoketests: ${{ parameters.smoketests }}
- ${{ if ne('', parameters.codecov_token) }}:
- stage: ${{ format('{0}coverage', parameters.prefix) }}
${{ if ne(parameters.prefix, '') }}:
Expand Down
31 changes: 20 additions & 11 deletions azure/style.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
parameters:
setup: []
smoketests: true
jonhoo marked this conversation as resolved.
Show resolved Hide resolved

jobs:
- template: rustfmt.yml
parameters:
name: rustfmt
- template: rustfmt.yml
parameters:
name: rustfmt_beta
rust: beta
allow_fail: true
- ${{ if eq(parameters.smoketests, 'true') }}:
- template: rustfmt.yml
parameters:
name: rustfmt_beta
rust: beta
allow_fail: true
- template: cargo-clippy.yml
parameters:
name: clippy
setup: ${{ parameters.setup }}
- template: cargo-clippy.yml
parameters:
name: clippy_beta
setup: ${{ parameters.setup }}
rust: beta
allow_fail: true
- ${{ if eq(parameters.smoketests, 'true') }}:
jonhoo marked this conversation as resolved.
Show resolved Hide resolved
- template: cargo-clippy.yml
parameters:
name: clippy_nowarnings
fail_all: true
jonhoo marked this conversation as resolved.
Show resolved Hide resolved
allow_fail: true
- ${{ if eq(parameters.smoketests, 'true') }}:
- template: cargo-clippy.yml
parameters:
name: clippy_beta
setup: ${{ parameters.setup }}
rust: beta
allow_fail: true
16 changes: 9 additions & 7 deletions azure/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
envs: {}
setup: []
smoketests: true

jobs:
- template: test.yml
Expand All @@ -15,10 +16,11 @@ jobs:
rust: beta
envs: ${{ parameters.envs }}
setup: ${{ parameters.setup }}
- template: test.yml
parameters:
name: cargo_test_nightly
rust: nightly
allow_fail: true
envs: ${{ parameters.envs }}
setup: ${{ parameters.setup }}
- ${{ if eq(parameters.smoketests, 'true') }}:
- template: test.yml
parameters:
name: cargo_test_nightly
rust: nightly
allow_fail: true
envs: ${{ parameters.envs }}
setup: ${{ parameters.setup }}