-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add azure pipelines configuration
Add a basic azure configuration that runs tests and benchmarks on linux, mac, and windows. Closes #1673
- Loading branch information
1 parent
144893b
commit e594728
Showing
3 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
trigger: ["master"] | ||
pr: ["master"] | ||
|
||
variables: | ||
features: '' | ||
bench: 'false' | ||
|
||
strategy: | ||
matrix: | ||
windows-nightly: | ||
imageName: 'vs2017-win2016' | ||
rust: nightly | ||
mac-nightly: | ||
imageName: 'macos-10.13' | ||
rust: nightly | ||
bench: 'true' | ||
# linux-stable: | ||
# imageName: 'ubuntu-16.04' | ||
# rust: stable | ||
# features: '--no-default-features --features runtime,__internal_happy_eyeballs_tests' | ||
# linux-stable-no-features: | ||
# imageName: 'ubuntu-16.04' | ||
# rust: stable | ||
# features: '--no-default-features' | ||
# linux-beta: | ||
# imageName: 'ubuntu-16.04' | ||
# rust: beta | ||
# features: '--no-default-features --features runtime,__internal_happy_eyeballs_tests' | ||
linux-nightly: | ||
imageName: 'ubuntu-16.04' | ||
rust: nightly | ||
features: '--no-default-features --features runtime,nightly' | ||
bench: 'true' | ||
# linux-minimum-supported-version: | ||
# imageName: 'ubuntu-16.04' | ||
# rust: stable | ||
# features: '--no-default-features --features runtime' | ||
|
||
pool: | ||
vmImage: $(imageName) | ||
|
||
steps: | ||
- template: ci/azure-install-rust.yml | ||
parameters: | ||
rust_version: $(rust) | ||
- template: ci/azure-test.yml | ||
parameters: | ||
features: $(features) | ||
bench: $(bench) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
steps: | ||
# Linux and macOS. | ||
- script: | | ||
set -e | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
export PATH=$PATH:$HOME/.cargo/bin | ||
rustup toolchain install $RUSTUP_TOOLCHAIN | ||
rustup default $RUSTUP_TOOLCHAIN | ||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" | ||
env: | ||
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}} | ||
displayName: "Install rust (*nix)" | ||
condition: ne( variables['Agent.OS'], 'Windows_NT' ) | ||
# Windows. | ||
- script: | | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain none | ||
set PATH=%PATH%;%USERPROFILE%\.cargo\bin | ||
rustup toolchain install %RUSTUP_TOOLCHAIN% | ||
rustup default %RUSTUP_TOOLCHAIN% | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" | ||
env: | ||
RUSTUP_TOOLCHAIN: ${{parameters.rust_version}} | ||
displayName: "Install rust (Windows)" | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
# All platforms. | ||
- script: | | ||
rustup toolchain list | ||
rustc -Vv | ||
cargo -V | ||
displayName: Query rust and cargo versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
steps: | ||
# Linux and macOS. | ||
- script: | | ||
set -e | ||
cargo build $FEATURES | ||
cargo test $FEATURES | ||
env: | ||
FEATURES: ${{parameters.features}} | ||
displayName: "Build & Test (*nix)" | ||
condition: ne( variables['Agent.OS'], 'Windows_NT' ) | ||
# Windows. | ||
- script: | | ||
cargo build %FEATURES% | ||
cargo test %FEATURES% | ||
env: | ||
FEATURES: ${{parameters.features}} | ||
displayName: "Build & Test (Windows)" | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
# Linux and macOS. | ||
- ${{ if eq(parameters.bench, 'true') }}: | ||
- script: cargo bench $FEATURES | ||
env: | ||
FEATURES: ${{parameters.features}} | ||
displayName: "Benchmark (*nix)" | ||
condition: ne( variables['Agent.OS'], 'Windows_NT' ) | ||
|
||
# Windows. | ||
- ${{ if eq(parameters.bench, 'true') }}: | ||
- script: cargo bench %FEATURES% | ||
env: | ||
FEATURES: ${{parameters.features}} | ||
displayName: "Benchmark (Windows)" | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) |