rust-imap/azure-pipelines.yml
Bryce Fisher-Fleig f15bdfb458 (feat) default feature for native_tls (aka openssl)
Establishes conditional compilation for all integration with the
native_tls crate in this crate. Since native_tls has been deeply
integrated into this crate for a long time, we want to maintain
backwards compatibility by making this feature part of the default.

For a consumer of this crate to "opt-out", including this in
cargo.toml:

```
[dependencies.imap]
version = 0.16.0        # Replace this with the correct version
default-features = false
```

See the conversation on Github for details on this approach:
https://github.com/jonhoo/rust-imap/issues/123
2019-09-24 08:13:17 -07:00

104 lines
2.8 KiB
YAML

stages:
- stage: check
displayName: Compilation check
dependsOn: []
jobs:
- template: azure/cargo-check.yml@templates
parameters:
name: cargo_check
# This represents the minimum Rust version supported.
# Tests are not run as tests may require newer versions of rust.
- stage: msrv
displayName: "Minimum supported Rust version: 1.36.0"
dependsOn: []
jobs:
- template: azure/cargo-check.yml@templates
parameters:
rust: 1.36.0
- stage: test
displayName: Test suite
dependsOn: check
jobs:
- job: test
displayName: cargo test --{examples,doc,lib} (cross-platform)
strategy:
matrix:
Linux:
vmImage: ubuntu-16.04
MacOS:
vmImage: macOS-10.14
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
- script: cargo build --all-targets --verbose --no-default-features
displayName: Compile without openssl
- 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
# - stage: coverage
# displayName: Code coverage
# dependsOn: test
# jobs:
# - template: azure/coverage.yml@templates
# parameters:
# codecov_token: $(CODECOV_TOKEN_SECRET)
# services:
# greenmail: greenmail
# envs:
# TEST_HOST: greenmail
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
endpoint: jonhoo
containers:
- container: greenmail
image: greenmail/standalone:1.5.10
ports:
- 3025:3025
- 3110:3110
- 3143:3143
- 3465:3465
- 3993:3993
- 3995:3995
env:
GREENMAIL_OPTS: "-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose"