Skip to content

Commit 74e0ffc

Browse files
committed
Set up CI with Azure Pipelines
[skip ci]
1 parent 87adf6d commit 74e0ffc

File tree

4 files changed

+53
-21
lines changed

4 files changed

+53
-21
lines changed

.travis.yml

-21
This file was deleted.

azure-pipelines.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
trigger:
2+
- master
3+
4+
jobs:
5+
- job: Linux
6+
pool:
7+
vmImage: ubuntu-16.04
8+
steps:
9+
- template: ci/azure-steps.yml
10+
strategy:
11+
matrix:
12+
stable:
13+
TOOLCHAIN: stable
14+
beta:
15+
TOOLCHAIN: beta
16+
nightly:
17+
TOOLCHAIN: nightly
18+
- job: docs
19+
steps:
20+
- template: ci/azure-install-rust.yml
21+
- script: cargo doc --no-deps --all-features
22+
- script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd target/doc && ../../rust_out)
23+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
24+
env:
25+
GITHUB_DEPLOY_KEY: $(GITHUB_DEPLOY_KEY)

ci/azure-install-rust.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
steps:
2+
- bash: |
3+
set -e
4+
toolchain=$TOOLCHAIN
5+
if [ "$toolchain" = "" ]; then
6+
toolchain=stable
7+
fi
8+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
9+
echo "##vso[task.prependpath]$HOME/.cargo/bin"
10+
displayName: Install rust (unix)
11+
condition: ne( variables['Agent.OS'], 'Windows_NT' )
12+
13+
- script: |
14+
curl -sSf -o rustup-init.exe https://win.rustup.rs
15+
rustup-init.exe -y --default-toolchain stable-%TARGET%
16+
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
17+
displayName: Install rust (windows)
18+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
19+
20+
- script: |
21+
rustc -Vv
22+
cargo -V
23+
displayName: Query rust and cargo versions

ci/azure-steps.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
steps:
2+
- template: azure-install-rust.yml
3+
4+
- script: cargo test
5+
displayName: Run tests

0 commit comments

Comments
 (0)