-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4aca6d
commit ce04a53
Showing
7 changed files
with
156 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,89 @@ | ||
trigger: | ||
branches: | ||
exclude: | ||
- master | ||
pr: | ||
- master | ||
|
||
jobs: | ||
- job: Linux | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- template: ci/azure-test-all.yml | ||
strategy: | ||
matrix: | ||
stable: | ||
TOOLCHAIN: stable | ||
beta: | ||
TOOLCHAIN: beta | ||
nightly: | ||
TOOLCHAIN: nightly | ||
variables: | ||
OTHER_TARGET: i686-unknown-linux-gnu | ||
|
||
- job: macOS | ||
pool: | ||
vmImage: macos-10.13 | ||
steps: | ||
- template: ci/azure-test-all.yml | ||
variables: | ||
TOOLCHAIN: stable | ||
OTHER_TARGET: i686-apple-darwin | ||
|
||
- job: Windows | ||
pool: | ||
vmImage: windows-2019 | ||
steps: | ||
- template: ci/azure-test-all.yml | ||
strategy: | ||
matrix: | ||
x86_64-msvc: | ||
TOOLCHAIN: stable-x86_64-pc-windows-msvc | ||
OTHER_TARGET: i686-pc-windows-msvc | ||
- job: rustfmt | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- template: ci/azure-install-rust.yml | ||
- bash: rustup component add rustfmt | ||
displayName: "Install rustfmt" | ||
- bash: cargo fmt --all -- --check | ||
displayName: "Check rustfmt (cargo)" | ||
- bash: cd crates/cargo-test-macro && cargo fmt --all -- --check | ||
displayName: "Check rustfmt (cargo-test-macro)" | ||
- bash: cd crates/crates-io && cargo fmt --all -- --check | ||
displayName: "Check rustfmt (crates-io)" | ||
- bash: cd crates/resolver-tests && cargo fmt --all -- --check | ||
displayName: "Check rustfmt (resolver-tests)" | ||
variables: | ||
TOOLCHAIN: stable | ||
|
||
- job: resolver | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- template: ci/azure-install-rust.yml | ||
- bash: cargo test --manifest-path crates/resolver-tests/Cargo.toml | ||
displayName: "Resolver tests" | ||
variables: | ||
TOOLCHAIN: stable | ||
|
||
- job: docs | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- template: ci/azure-install-rust.yml | ||
- bash: | | ||
set -e | ||
mkdir mdbook | ||
curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.1/mdbook-v0.3.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook | ||
echo "##vso[task.prependpath]`pwd`/mdbook" | ||
displayName: "Install mdbook" | ||
- bash: cargo doc --no-deps | ||
displayName: "Build documentation" | ||
- bash: cd src/doc && mdbook build --dest-dir ../../target/doc | ||
displayName: "Build mdbook documentation" | ||
variables: | ||
TOOLCHAIN: stable | ||
|
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,28 @@ | ||
steps: | ||
- bash: | | ||
set -e | ||
if command -v rustup; then | ||
echo `command -v rustup` `rustup -V` already installed | ||
rustup self update | ||
elif [ "$AGENT_OS" = "Windows_NT" ]; then | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain $TOOLCHAIN | ||
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin" | ||
else | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN | ||
echo "##vso[task.prependpath]$HOME/.cargo/bin" | ||
fi | ||
displayName: Install rustup | ||
- bash: | | ||
set -e | ||
rustup update $TOOLCHAIN | ||
rustup default $TOOLCHAIN | ||
displayName: Install rust | ||
- bash: | | ||
set -ex | ||
rustup -V | ||
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,25 @@ | ||
steps: | ||
- checkout: self | ||
fetchDepth: 1 | ||
|
||
- template: azure-install-rust.yml | ||
|
||
- bash: rustup target add $OTHER_TARGET | ||
displayName: "Install cross-compile target" | ||
|
||
- bash: sudo apt install gcc-multilib | ||
displayName: "Install gcc-multilib (linux)" | ||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) | ||
|
||
# Some tests rely on a clippy command to run, so let's try to install clippy to | ||
# we can be sure to run those tests. | ||
- bash: rustup component add clippy || echo "clippy not available" | ||
displayName: "Install clippy (maybe)" | ||
|
||
# Deny warnings on CI to avoid warnings getting into the codebase, and note the | ||
# `force-system-lib-on-osx` which is intended to fix compile issues on OSX where | ||
# compiling curl from source on OSX yields linker errors on Azure. It's sort of | ||
# unclear how to fix these linker errors and why it worked previously on Travis, | ||
# but if you can remove the `curl` feature please do. | ||
- bash: cargo test --features 'deny-warnings curl/force-system-lib-on-osx' | ||
displayName: "cargo test" |
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