Skip to content

Commit a1085b1

Browse files
committed
Fix scripts for MSVC
1 parent 06528a9 commit a1085b1

File tree

2 files changed

+12
-93
lines changed

2 files changed

+12
-93
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2,87 +2,10 @@
22
# matching the patterns below.
33
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers
44
trigger:
5-
- master
5+
- urgh
66
- ci-*
77

88
jobs:
9-
- job: min_linux
10-
pool:
11-
vmImage: ubuntu-16.04
12-
displayName: Minimum Rust (Linux)
13-
variables:
14-
TOOLCHAIN: 1.16.0
15-
steps:
16-
- template: ci/azure-install-rust.yml
17-
- script: cargo build
18-
19-
- job: min_Windows
20-
pool:
21-
vmImage: vs2017-win2016
22-
displayName: Minimum Rust (Windows)
23-
variables:
24-
TOOLCHAIN: 1.16.0
25-
steps:
26-
- template: ci/azure-install-rust.yml
27-
- script: cargo build
28-
29-
- job: Linux
30-
pool:
31-
vmImage: ubuntu-16.04
32-
steps:
33-
- template: ci/azure-steps.yml
34-
strategy:
35-
matrix:
36-
x86_64:
37-
TARGET: x86_64-unknown-linux-gnu
38-
i686:
39-
TARGET: i686-unknown-linux-gnu
40-
x86_64-beta:
41-
TARGET: x86_64-unknown-linux-gnu
42-
TOOLCHAIN: beta
43-
x86_64-nightly:
44-
TARGET: x86_64-unknown-linux-gnu
45-
TOOLCHAIN: nightly
46-
47-
- job: macOS
48-
pool:
49-
vmImage: macos-10.13
50-
steps:
51-
- template: ci/azure-steps.yml
52-
strategy:
53-
matrix:
54-
x86_64:
55-
TARGET: x86_64-apple-darwin
56-
aarch64-ios:
57-
TARGET: aarch64-apple-ios
58-
NO_RUN: --no-run
59-
60-
- job: Windows_vs2019
61-
pool:
62-
vmImage: windows-2019
63-
steps:
64-
- template: ci/azure-steps.yml
65-
strategy:
66-
matrix:
67-
x86_64-msvc:
68-
TARGET: x86_64-pc-windows-msvc
69-
70-
- job: Windows_vs2017
71-
pool:
72-
vmImage: vs2017-win2016
73-
steps:
74-
- template: ci/azure-steps.yml
75-
strategy:
76-
matrix:
77-
x86_64-msvc:
78-
TARGET: x86_64-pc-windows-msvc
79-
i686-msvc:
80-
TARGET: i686-pc-windows-msvc
81-
x86_64-gnu:
82-
TARGET: x86_64-pc-windows-gnu
83-
i686-gnu:
84-
TARGET: i686-pc-windows-gnu
85-
869
- job: Windows_vs2015
8710
pool:
8811
vmImage: vs2015-win2012r2
@@ -94,12 +17,3 @@ jobs:
9417
TARGET: x86_64-pc-windows-msvc
9518
i686-msvc:
9619
TARGET: i686-pc-windows-msvc
97-
98-
- job: docs
99-
steps:
100-
- template: ci/azure-install-rust.yml
101-
- script: cargo doc --no-deps --all-features
102-
- script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd target/doc && ../../rust_out)
103-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
104-
env:
105-
GITHUB_DEPLOY_KEY: $(GITHUB_DEPLOY_KEY)

ci/azure-install-rust.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ steps:
1515
displayName: Install rust (unix)
1616
condition: ne( variables['Agent.OS'], 'Windows_NT' )
1717
18-
- script: |
19-
IF "%RUSTUP_HOME%"=="" (curl -sSf -o rustup-init.exe https://win.rustup.rs)
20-
IF "%TOOLCHAIN%"=="" (SET TOOLCHAIN=stable-%TARGET%)
21-
IF "%RUSTUP_HOME%"=="" (rustup-init.exe -y --default-toolchain %TOOLCHAIN%)
22-
rustup update --no-self-update %TOOLCHAIN%
23-
rustup default %TOOLCHAIN%
18+
- powershell: |
19+
if (!$env:TOOLCHAIN) {
20+
$env:TOOLCHAIN = "stable-${env:TARGET}";
21+
}
22+
if ($env:RUSTUP_HOME) {
23+
rustup update --no-self-update $env:TOOLCHAIN
24+
rustup default $env:TOOLCHAIN
25+
} else {
26+
curl.exe -sSf -o rustup-init.exe https://win.rustup.rs
27+
./rustup-init.exe -y --default-toolchain $env:TOOLCHAIN
28+
}
2429
displayName: Install rust (windows)
2530
condition: eq( variables['Agent.OS'], 'Windows_NT' )
2631

0 commit comments

Comments
 (0)