Skip to content

Commit 37c4cca

Browse files
committed
Add a azure pipelines CI script
1 parent d6bff9c commit 37c4cca

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

azure-pipelines.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Documentation: https://aka.ms/yaml
2+
3+
strategy:
4+
matrix:
5+
linux:
6+
image_name: 'ubuntu-16.04'
7+
rustup_toolchain: nightly
8+
mac:
9+
image_name: 'macos-10.13'
10+
rustup_toolchain: nightly
11+
windows:
12+
image_name: 'vs2017-win2016'
13+
rustup_toolchain: nightly
14+
15+
pool:
16+
vmImage: $(image_name)
17+
18+
steps:
19+
- bash: |
20+
echo "Hello world from $AGENT_NAME running on $AGENT_OS"
21+
echo "Reason: $BUILD_REASON"
22+
echo "Requested for: $BUILD_REQUESTEDFOR"
23+
displayName: 'Build Info'
24+
continueOnError: true
25+
26+
- script: |
27+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
28+
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
29+
condition: or(eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ))
30+
displayName: 'Install Rust (Linux/macOS)'
31+
32+
- script: |
33+
curl -sSf -o rustup-init.exe https://win.rustup.rs
34+
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
35+
echo ##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin
36+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
37+
displayName: 'Install Rust (Windows)'
38+
39+
- script: |
40+
rustc -Vv
41+
cargo -V
42+
displayName: 'Print Rust Version'
43+
continueOnError: true
44+
45+
- script: cargo build
46+
displayName: 'Build'
47+
48+
- script: cargo test
49+
displayName: 'Test'

0 commit comments

Comments
 (0)