Skip to content

Commit 09d7656

Browse files
committed
Merge branch 'master' into return-error-result-from-iter
2 parents a558fab + 9091ba1 commit 09d7656

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

azure-pipelines-template.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
jobs:
2+
- job: ${{ parameters.name }}
3+
pool:
4+
vmImage: ${{ parameters.vmImage }}
5+
strategy:
6+
matrix:
7+
stable:
8+
rustup_toolchain: stable
9+
beta:
10+
rustup_toolchain: beta
11+
nightly:
12+
rustup_toolchain: nightly
13+
steps:
14+
# Linux and macOS.
15+
- ${{ if ne(parameters.name, 'Windows') }}:
16+
- script: |
17+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
18+
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
19+
displayName: Install rust
20+
# Windows.
21+
- ${{ if eq(parameters.name, 'Windows') }}:
22+
- script: |
23+
curl -sSf -o rustup-init.exe https://win.rustup.rs
24+
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
25+
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
26+
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
27+
displayName: Install rust (windows)
28+
# All platforms.
29+
- script: |
30+
rustc -Vv
31+
cargo -V
32+
displayName: Query rust and cargo versions
33+
- script: cargo build
34+
displayName: Build
35+
# Linux and macOS w/nightly toolchain.
36+
# Ideally we'd only run the script for the nightly toolchain, but I can't
37+
# figure out how to determine that within the Azure Pipelines conditional.
38+
- ${{ if ne(parameters.name, 'Windows') }}:
39+
- script: |
40+
if [ "$RUSTUP_TOOLCHAIN" = 'nightly' ]
41+
then cargo test
42+
fi
43+
displayName: Test
44+
# Windows w/nightly toolchain.
45+
# Ideally we'd only run the script for the nightly toolchain, but I can't
46+
# figure out how to determine that within the Azure Pipelines conditional.
47+
- ${{ if eq(parameters.name, 'Windows') }}:
48+
- script: if "%RUSTUP_TOOLCHAIN%" == "nightly" cargo test
49+
displayName: Test

azure-pipelines.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
jobs:
2+
- template: azure-pipelines-template.yml
3+
parameters:
4+
name: macOS
5+
vmImage: macOS-10.13
6+
7+
- template: azure-pipelines-template.yml
8+
parameters:
9+
name: Linux
10+
vmImage: ubuntu-16.04
11+
12+
- template: azure-pipelines-template.yml
13+
parameters:
14+
name: Windows
15+
vmImage: vs2017-win2016

0 commit comments

Comments
 (0)