Fix up CI to use new fancy Azure Pipelines CI
This commit is contained in:
parent
031233ab59
commit
39f93ca05f
1 changed files with 69 additions and 77 deletions
|
|
@ -1,96 +1,88 @@
|
||||||
stages:
|
jobs:
|
||||||
- stage: check
|
- job: test
|
||||||
displayName: Compilation check
|
displayName: cargo test --{examples,doc,lib}
|
||||||
dependsOn: []
|
strategy:
|
||||||
jobs:
|
matrix:
|
||||||
- template: azure/cargo-check.yml@templates
|
Linux-stable:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
|
rust: stable
|
||||||
|
Linux-beta:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
|
rust: beta
|
||||||
|
Linux-nightly:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
|
rust: nightly
|
||||||
|
MacOS:
|
||||||
|
vmImage: macOS-10.14
|
||||||
|
rust: stable
|
||||||
|
Windows:
|
||||||
|
vmImage: windows-2019
|
||||||
|
rust: stable
|
||||||
|
pool:
|
||||||
|
vmImage: $(vmImage)
|
||||||
|
steps:
|
||||||
|
- template: install-rust.yml@templates
|
||||||
parameters:
|
parameters:
|
||||||
name: cargo_check
|
rust: $(rust)
|
||||||
|
components:
|
||||||
|
- rustfmt
|
||||||
|
- clippy
|
||||||
|
- script: cargo check --all-targets
|
||||||
|
displayName: cargo check
|
||||||
|
- script: cargo test --examples
|
||||||
|
displayName: cargo test --examples
|
||||||
|
- script: cargo test --doc
|
||||||
|
displayName: cargo test --doc
|
||||||
|
- script: cargo test --lib
|
||||||
|
displayName: cargo test --lib
|
||||||
|
- script: cargo fmt --all -- --check
|
||||||
|
displayName: cargo fmt --check
|
||||||
|
condition: and(eq( variables['rust'], 'beta' ), eq( variables['Agent.OS'], 'Linux' ))
|
||||||
|
- script: cargo clippy -- -D warnings
|
||||||
|
displayName: cargo clippy
|
||||||
|
condition: and(eq( variables['rust'], 'beta' ), eq( variables['Agent.OS'], 'Linux' ))
|
||||||
# This represents the minimum Rust version supported.
|
# This represents the minimum Rust version supported.
|
||||||
# Tests are not run as tests may require newer versions of rust.
|
# Tests are not run as tests may require newer versions of rust.
|
||||||
- stage: msrv
|
- job: msrv
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
displayName: "Minimum supported Rust version: 1.36.0"
|
displayName: "Minimum supported Rust version: 1.36.0"
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
jobs:
|
steps:
|
||||||
- template: azure/cargo-check.yml@templates
|
- template: install-rust.yml@templates
|
||||||
parameters:
|
parameters:
|
||||||
rust: 1.36.0
|
rust: 1.36.0
|
||||||
- stage: test
|
- script: cargo check
|
||||||
displayName: Test suite
|
displayName: cargo check
|
||||||
dependsOn: check
|
- job: integration
|
||||||
jobs:
|
displayName: cargo test --tests
|
||||||
- job: test
|
pool:
|
||||||
displayName: cargo test --{examples,doc,lib} (cross-platform)
|
vmImage: ubuntu-latest
|
||||||
strategy:
|
services:
|
||||||
matrix:
|
greenmail: greenmail
|
||||||
Linux:
|
steps:
|
||||||
vmImage: ubuntu-16.04
|
- template: install-rust.yml@templates
|
||||||
MacOS:
|
- script: cargo test --tests
|
||||||
vmImage: macOS-10.14
|
displayName: cargo test
|
||||||
Windows:
|
|
||||||
vmImage: windows-2019
|
|
||||||
pool:
|
|
||||||
vmImage: $(vmImage)
|
|
||||||
steps:
|
|
||||||
- template: azure/install-rust.yml@templates
|
|
||||||
parameters:
|
|
||||||
rust: stable
|
|
||||||
- script: cargo test --examples
|
|
||||||
displayName: Test examples
|
|
||||||
- script: cargo test --doc
|
|
||||||
displayName: Run doctests
|
|
||||||
- script: cargo test --lib
|
|
||||||
displayName: Run unit tests
|
|
||||||
- job: integration
|
|
||||||
displayName: cargo test
|
|
||||||
pool:
|
|
||||||
vmImage: ubuntu-16.04
|
|
||||||
services:
|
|
||||||
greenmail: greenmail
|
|
||||||
steps:
|
|
||||||
- template: azure/install-rust.yml@templates
|
|
||||||
parameters:
|
|
||||||
rust: stable
|
|
||||||
- script: cargo test
|
|
||||||
displayName: Run tests
|
|
||||||
- template: azure/install-rust.yml@templates
|
|
||||||
parameters:
|
|
||||||
rust: beta
|
|
||||||
- script: cargo test
|
|
||||||
displayName: Run tests on beta
|
|
||||||
- template: azure/install-rust.yml@templates
|
|
||||||
parameters:
|
|
||||||
rust: nightly
|
|
||||||
- script: cargo test
|
|
||||||
displayName: Run tests on nightly
|
|
||||||
continueOnError: true
|
|
||||||
- stage: style
|
|
||||||
displayName: Style linting
|
|
||||||
dependsOn: check
|
|
||||||
jobs:
|
|
||||||
- template: azure/style.yml@templates
|
|
||||||
# https://github.com/greenmail-mail-test/greenmail/issues/284
|
# https://github.com/greenmail-mail-test/greenmail/issues/284
|
||||||
# - stage: coverage
|
# - template: coverage.yml@templates
|
||||||
# displayName: Code coverage
|
# parameters:
|
||||||
# dependsOn: test
|
# token: $(CODECOV_TOKEN_SECRET)
|
||||||
# jobs:
|
# services:
|
||||||
# - template: azure/coverage.yml@templates
|
# greenmail: greenmail
|
||||||
# parameters:
|
# envs:
|
||||||
# codecov_token: $(CODECOV_TOKEN_SECRET)
|
# TEST_HOST: greenmail
|
||||||
# services:
|
|
||||||
# greenmail: greenmail
|
|
||||||
# envs:
|
|
||||||
# TEST_HOST: greenmail
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
repositories:
|
repositories:
|
||||||
- repository: templates
|
- repository: templates
|
||||||
type: github
|
type: github
|
||||||
name: crate-ci/azure-pipelines
|
name: crate-ci/azure-pipelines
|
||||||
|
ref: refs/heads/v0.3
|
||||||
endpoint: jonhoo
|
endpoint: jonhoo
|
||||||
containers:
|
containers:
|
||||||
- container: greenmail
|
- container: greenmail
|
||||||
image: greenmail/standalone:1.5.10
|
image: greenmail/standalone:1.5.11
|
||||||
ports:
|
ports:
|
||||||
- 3025:3025
|
- 3025:3025
|
||||||
- 3110:3110
|
- 3110:3110
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue