Skip to content

Commit e6830c1

Browse files
authored
Merge pull request #2 from alexcrichton/azure-pipelines
Some review feedback and other misc tweaks
2 parents 9f37b3a + 9843a79 commit e6830c1

15 files changed

+249
-234
lines changed

.azure-pipelines/auto.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ variables:
1111

1212
jobs:
1313
- job: Linux
14-
timeoutInMinutes: 180
1514
pool:
1615
vmImage: ubuntu-16.04
1716
steps:
18-
- template: steps/linux.yml
17+
- template: steps/run.yml
1918
strategy:
2019
matrix:
2120
x86_64-gnu-llvm-6.0:
@@ -151,13 +150,12 @@ jobs:
151150
IMAGE: mingw-check
152151

153152
- job: macOS
154-
timeoutInMinutes: 180
155153
pool:
156154
vmImage: macos-10.13
157155
steps:
158156
- checkout: self
159157
fetchDepth: 2
160-
- template: steps/macos.yml
158+
- template: steps/run.yml
161159
strategy:
162160
matrix:
163161
# OSX builders running tests, these run the full test suite.
@@ -216,11 +214,10 @@ jobs:
216214

217215

218216
- job: Windows
219-
timeoutInMinutes: 180
220217
pool:
221218
vmImage: 'vs2017-win2016'
222219
steps:
223-
- template: steps/windows.yml
220+
- template: steps/run.yml
224221
strategy:
225222
matrix:
226223
# # 32/64 bit MSVC tests

.azure-pipelines/pr.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ pr:
88

99
jobs:
1010
- job: Linux
11-
timeoutInMinutes: 180
1211
pool:
1312
vmImage: ubuntu-16.04
1413
steps:
15-
- template: steps/linux.yml
14+
- template: steps/run.yml
1615
strategy:
1716
matrix:
1817
x86_64-gnu-llvm-6.0:
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
steps:
2+
3+
- bash: |
4+
set -e
5+
curl -f http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz | tar xJf -
6+
7+
export CC=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang
8+
echo "##vso[task.setvariable variable=CC]$CC"
9+
10+
export CXX=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang++
11+
echo "##vso[task.setvariable variable=CXX]$CXX"
12+
13+
# Configure `AR` specifically so rustbuild doesn't try to infer it as
14+
# `clang-ar` by accident.
15+
echo "##vso[task.setvariable variable=AR]ar"
16+
displayName: Install clang (OSX)
17+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
18+
19+
# If we're compiling for MSVC then we, like most other distribution builders,
20+
# switch to clang as the compiler. This'll allow us eventually to enable LTO
21+
# amongst LLVM and rustc. Note that we only do this on MSVC as I don't think
22+
# clang has an output mode compatible with MinGW that we need. If it does we
23+
# should switch to clang for MinGW as well!
24+
#
25+
# Note that the LLVM installer is an NSIS installer
26+
#
27+
# Original downloaded here came from
28+
# http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
29+
- script: |
30+
powershell -Command "iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/LLVM-7.0.0-win64.exe"
31+
set CLANG_DIR=%CD%\citools\clang-rust
32+
%TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR%
33+
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe
34+
echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
35+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
36+
displayName: Install clang (Windows)
37+
38+
# Note that we don't install clang on Linux since its compiler story is just so
39+
# different. Each container has its own toolchain configured appropriately
40+
# already.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
steps:
2+
3+
- bash: |
4+
set -e
5+
curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin
6+
chmod +x /usr/local/bin/sccache
7+
displayName: Install sccache (OSX)
8+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
9+
10+
- script: |
11+
md sccache
12+
powershell -Command "iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
13+
echo ##vso[task.prependpath]%CD%\sccache
14+
displayName: Install sccache (Windows)
15+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
16+
17+
# Note that we don't install sccache on Linux since it's installed elsewhere
18+
# through all the containers.
19+
#
20+
# FIXME: we should probably install sccache outside the containers and then
21+
# mount it inside the containers so we can centralize all installation here.
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
steps:
2-
- checkout: self
3-
fetchDepth: 2
4-
5-
- bash: |
6-
set -x
7-
git submodule
8-
export SUBMODULES_EXCLUDES=$(git submodule | grep -Eow 'src/[^ ]+' | sed 's/\(.*\)/--exclude=\1\/\.git/')
9-
echo "##vso[task.setvariable variable=SUBMODULES_EXCLUDES;]$SUBMODULES_EXCLUDES"
10-
11-
- script: |
12-
REM echo hack as drive D is too small
13-
IF NOT "%DISABLE_DISK_SPACE_HACK%"=="1" (
14-
mkdir c:\MORE_SPACE
15-
mklink /J build c:\MORE_SPACE
16-
)
2+
# FIXME: are these still needed?
3+
# - bash: |
4+
# set -x
5+
# git submodule
6+
# export SUBMODULES_EXCLUDES=$(git submodule | grep -Eow 'src/[^ ]+' | sed 's/\(.*\)/--exclude=\1\/\.git/')
7+
# echo "##vso[task.setvariable variable=SUBMODULES_EXCLUDES;]$SUBMODULES_EXCLUDES"
8+
#
9+
# - script: |
10+
# REM echo hack as drive D is too small
11+
# IF NOT "%DISABLE_DISK_SPACE_HACK%"=="1" (
12+
# mkdir c:\MORE_SPACE
13+
# mklink /J build c:\MORE_SPACE
14+
# )
1715

1816
- script: |
1917
set MSYS_PATH=%CD%\citools\msys64
@@ -31,6 +29,7 @@ steps:
3129
echo ##vso[task.setvariable variable=MSYS_PATH]%MSYS_PATH%
3230
echo ##vso[task.prependpath]%MSYS_PATH%\usr\bin
3331
displayName: Install msys2
32+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
3433

3534
# If we need to download a custom MinGW, do so here and set the path
3635
# appropriately.
@@ -44,28 +43,9 @@ steps:
4443
powershell -Command "iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
4544
7z x -y %MINGW_ARCHIVE% > nul
4645
echo ##vso[task.prependpath]%CD%\%MINGW_DIR%\bin
47-
condition: and(succeeded(), ne(variables['MINGW_URL'],''))
46+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],''))
4847
displayName: Download custom MinGW
4948

50-
# If we're compiling for MSVC then we, like most other distribution builders,
51-
# switch to clang as the compiler. This'll allow us eventually to enable LTO
52-
# amongst LLVM and rustc. Note that we only do this on MSVC as I don't think
53-
# clang has an output mode compatible with MinGW that we need. If it does we
54-
# should switch to clang for MinGW as well!
55-
#
56-
# Note that the LLVM installer is an NSIS installer
57-
#
58-
# Original downloaded here came from
59-
# http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
60-
- script: |
61-
powershell -Command "iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/LLVM-7.0.0-win64.exe"
62-
set CLANG_DIR=%CD%\citools\clang-rust
63-
%TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR%
64-
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe
65-
echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
66-
condition: and(succeeded(), eq(variables['MINGW_URL'],''))
67-
displayName: Download clang
68-
6949
# Here we do a pretty heinous thing which is to mangle the MinGW installation
7050
# we just had above. Currently, as of this writing, we're using MinGW-w64
7151
# builds of gcc, and that's currently at 6.3.0. We use 6.3.0 as it appears to
@@ -87,28 +67,20 @@ steps:
8767
echo ON
8868
powershell -Command "iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
8969
mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%\bin\gdborig.exe
90-
condition: and(succeeded(), ne(variables['MINGW_URL'],''))
70+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],''))
9171
displayName: Override with 6.3.0 gdb with 6.2.0 gdb
9272

9373
# Otherwise pull in the MinGW installed on appveyor
9474
- script: |
95-
echo Find mingw
96-
set PATH | findstr /i msys
97-
set PATH | findstr /i mingw
9875
echo ##vso[task.prependpath]%MSYS_PATH%\mingw%MSYS_BITS%\bin
99-
condition: and(succeeded(), eq(variables['MINGW_URL'],''))
76+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
10077
displayName: Add MinGW to path
10178

10279
- script: |
10380
copy C:\Python27amd64\python.exe C:\Python27amd64\python2.7.exe
10481
echo ##vso[task.prependpath]C:\Python27amd64
10582
displayName: Prefer the "native" Python as LLVM has trouble building with MSYS sometimes
106-
107-
- script: |
108-
md sccache
109-
powershell -Command "iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
110-
echo ##vso[task.prependpath]%CD%\sccache
111-
displayName: Download and install sccache
83+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
11284

11385
# Note that this is originally from the github releases patch of Ninja
11486
- script: |
@@ -120,41 +92,4 @@ steps:
12092
echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
12193
echo ##vso[task.prependpath]%CD%\ninja
12294
displayName: Download and install ninja
123-
124-
- script: |
125-
mkdir handle
126-
powershell -Command "iwr -outf 2017-05-15-Handle.zip https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-05-15-Handle.zip"
127-
7z x -ohandle 2017-05-15-Handle.zip
128-
del 2017-05-15-Handle.zip
129-
set PATH=%PATH%;%CD%\handle
130-
handle.exe -accepteula -help
131-
echo ##vso[task.setvariable variable=PATH]%PATH%
132-
displayName: Help debug handle issues
133-
134-
- template: show-environment-variables.yml
135-
136-
- script: |
137-
REM echo force the specific VS version
138-
IF "%VCVARS_BAT%" NEQ "" (
139-
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\%VCVARS_BAT%"
140-
)
141-
142-
where sccache
143-
where rev
144-
set | findstr /v SCCACHE_AZURE_CONNECTION_STRING
145-
146-
if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
147-
148-
sh src/ci/init_repo.sh . /d/cache/rustsrc
149-
sh src/ci/run.sh
150-
env:
151-
CI: true
152-
CI_JOB_NAME: $(System.JobDisplayName)
153-
SRC: .
154-
NO_CCACHE: 1
155-
156-
# explicitly decrypt secret variables
157-
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
158-
AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
159-
AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
160-
displayName: Run script
95+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

.azure-pipelines/steps/linux.yml

-35
This file was deleted.

.azure-pipelines/steps/macos.yml

-47
This file was deleted.

.azure-pipelines/steps/run-script.yml

-35
This file was deleted.

0 commit comments

Comments
 (0)