1
1
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
+ # )
17
15
18
16
- script : |
19
17
set MSYS_PATH=%CD%\citools\msys64
31
29
echo ##vso[task.setvariable variable=MSYS_PATH]%MSYS_PATH%
32
30
echo ##vso[task.prependpath]%MSYS_PATH%\usr\bin
33
31
displayName : Install msys2
32
+ condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
34
33
35
34
# If we need to download a custom MinGW, do so here and set the path
36
35
# appropriately.
@@ -44,28 +43,9 @@ steps:
44
43
powershell -Command "iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
45
44
7z x -y %MINGW_ARCHIVE% > nul
46
45
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'],''))
48
47
displayName : Download custom MinGW
49
48
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
-
69
49
# Here we do a pretty heinous thing which is to mangle the MinGW installation
70
50
# we just had above. Currently, as of this writing, we're using MinGW-w64
71
51
# 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:
87
67
echo ON
88
68
powershell -Command "iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
89
69
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'],''))
91
71
displayName : Override with 6.3.0 gdb with 6.2.0 gdb
92
72
93
73
# Otherwise pull in the MinGW installed on appveyor
94
74
- script : |
95
- echo Find mingw
96
- set PATH | findstr /i msys
97
- set PATH | findstr /i mingw
98
75
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'],''))
100
77
displayName : Add MinGW to path
101
78
102
79
- script : |
103
80
copy C:\Python27amd64\python.exe C:\Python27amd64\python2.7.exe
104
81
echo ##vso[task.prependpath]C:\Python27amd64
105
82
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'))
112
84
113
85
# Note that this is originally from the github releases patch of Ninja
114
86
- script : |
@@ -120,41 +92,4 @@ steps:
120
92
echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
121
93
echo ##vso[task.prependpath]%CD%\ninja
122
94
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'))
0 commit comments