Skip to content

Commit 10e060b

Browse files
committed
Refactor pipelines configuration slightly
1 parent 448f16d commit 10e060b

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

azure-pipelines.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,29 @@ trigger:
33

44
jobs:
55
- template: ci/azure-job-test-all.yml
6+
parameters:
7+
name: Linux_stable
68
- template: ci/azure-job-test-all.yml
79
parameters:
8-
os: macOS
910
vmImage: macOS-10.13
11+
name: Darwin_stable
1012
- template: ci/azure-job-test-all.yml
1113
parameters:
1214
toolchain: beta
15+
name: Linux_beta
1316
- template: ci/azure-job-test-all.yml
1417
parameters:
1518
toolchain: nightly
19+
name: Linux_nightly
1620
- template: ci/azure-job-test-all.yml
1721
parameters:
18-
os: Windows
1922
vmImage: vs2017-win2016
23+
name: Windows_stable
2024
- template: ci/azure-job-test-all.yml
2125
parameters:
22-
os: Windows
2326
vmImage: vs2017-win2016
2427
toolchain: stable-x86_64-gnu
25-
name: Windows_x86_64_MinGW
28+
name: Windows_stable_MinGW
2629
- job: systest
2730
steps:
2831
- template: ci/azure-install-rust.yml

ci/azure-install-rust.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
parameters:
2-
os: 'Linux'
32
toolchain: 'stable'
43

54
steps:
6-
- ${{ if ne(parameters.os, 'Windows') }}:
7-
- script: |
8-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
9-
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
10-
displayName: Install rust
11-
env:
12-
TOOLCHAIN: ${{ parameters.toolchain }}
5+
- bash: |
6+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
7+
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
8+
displayName: Install rust
9+
condition: ne( variables['Agent.OS'], 'Windows_NT' )
10+
env:
11+
TOOLCHAIN: ${{ parameters.toolchain }}
1312
14-
- ${{ if eq(parameters.os, 'Windows') }}:
15-
- script: |
16-
curl -sSf -o rustup-init.exe https://win.rustup.rs
17-
rustup-init.exe -y --default-toolchain %TOOLCHAIN%
18-
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
19-
displayName: Install rust
20-
env:
21-
TOOLCHAIN: ${{ parameters.toolchain }}
13+
- script: |
14+
curl -sSf -o rustup-init.exe https://win.rustup.rs
15+
rustup-init.exe -y --default-toolchain %TOOLCHAIN%
16+
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
17+
displayName: Install rust
18+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
19+
env:
20+
TOOLCHAIN: ${{ parameters.toolchain }}
2221
2322
- script: |
2423
rustc -Vv

ci/azure-job-test-all.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
parameters:
2-
os: 'Linux'
32
toolchain: 'stable'
43
vmImage: 'ubuntu-16.04'
54
name: ''
65

76
jobs:
8-
- job: ${{ coalesce(parameters.name, format('{0}_{1}', parameters.os, parameters.toolchain)) }}
7+
- job: ${{ parameters.name }}
98
pool:
109
vmImage: ${{ parameters.vmImage }}
1110
steps:
1211
- template: azure-install-rust.yml
1312
parameters:
14-
os: ${{ parameters.os }}
1513
toolchain: ${{ parameters.toolchain }}
1614
- script: cargo build
1715
- script: rustdoc --test README.md -L target/debug/deps --extern flate2=target/debug/libflate2.rlib

0 commit comments

Comments
 (0)