18
18
# one is MSI installers and one is EXE, but they're not used so frequently at
19
19
# this point anyway so perhaps it's a wash!
20
20
- script : |
21
- powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf is-install.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-08-22-is.exe"
22
- is-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
23
21
echo ##vso[task.prependpath]C:\Program Files (x86)\Inno Setup 5
22
+ curl.exe -o is-install.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-08-22-is.exe
23
+ is-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
24
24
displayName : Install InnoSetup
25
25
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
26
26
@@ -43,24 +43,18 @@ steps:
43
43
# FIXME: we should probe the default azure image and see if we can use the MSYS2
44
44
# toolchain there. (if there's even one there). For now though this gets the job
45
45
# done.
46
- - script : |
47
- set MSYS_PATH=%CD%\citools\msys64
48
- choco install msys2 --params="/InstallDir:%MSYS_PATH% /NoPath" -y
49
- set PATH=%MSYS_PATH%\usr\bin;%PATH%
50
- pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar
51
- IF "%MINGW_URL%"=="" (
52
- IF "%MSYS_BITS%"=="32" pacman -S --noconfirm --needed mingw-w64-i686-toolchain mingw-w64-i686-cmake mingw-w64-i686-gcc mingw-w64-i686-python2
53
- IF "%MSYS_BITS%"=="64" pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-python2
54
- )
55
- where rev
56
- rev --help
57
- where make
58
-
59
- echo ##vso[task.setvariable variable=MSYS_PATH]%MSYS_PATH%
60
- echo ##vso[task.prependpath]%MSYS_PATH%\usr\bin
46
+ - bash : |
47
+ set -e
48
+ choco install msys2 --params="/InstallDir:$(System.Workfolder)/msys2 /NoPath" -y --no-progress
49
+ echo "##vso[task.prependpath]$(System.Workfolder)/msys2/usr/bin"
50
+ mkdir -p "$(System.Workfolder)/msys2/home/$USERNAME"
61
51
displayName : Install msys2
62
52
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
63
53
54
+ - bash : pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar
55
+ displayName : Install msys2 base deps
56
+ condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
57
+
64
58
# If we need to download a custom MinGW, do so here and set the path
65
59
# appropriately.
66
60
#
@@ -81,39 +75,46 @@ steps:
81
75
#
82
76
# Note that we don't literally overwrite the gdb.exe binary because it appears
83
77
# to just use gdborig.exe, so that's the binary we deal with instead.
84
- - script : |
85
- powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
86
- 7z x -y %MINGW_ARCHIVE% > nul
87
- powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
88
- mv 2017-04-20-% MSYS_BITS% bit-gdborig.exe %MINGW_DIR%\bin\ gdborig.exe
89
- echo ##vso[task.prependpath]%CD%\% MINGW_DIR%\ bin
78
+ - bash : |
79
+ set -e
80
+ curl -o mingw.7z $MINGW_URL/$MINGW_ARCHIVE
81
+ 7z x -y mingw.7z > /dev/null
82
+ curl -o $MINGW_DIR/bin/gdborig.exe $MINGW_URL/ 2017-04-20-${ MSYS_BITS} bit-gdborig.exe
83
+ echo " ##vso[task.prependpath]`pwd`/$ MINGW_DIR/ bin"
90
84
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],''))
91
85
displayName : Download custom MinGW
92
86
93
- # Otherwise pull in the MinGW installed on appveyor
94
- - script : |
95
- echo ##vso[task.prependpath]%MSYS_PATH%\mingw%MSYS_BITS%\bin
87
+ # Otherwise install MinGW through `pacman`
88
+ - bash : |
89
+ set -e
90
+ arch=i686
91
+ if [ "$MSYS_BITS" = "64" ]; then
92
+ arch=x86_64
93
+ fi
94
+ pacman -S --noconfirm --needed mingw-w64-$arch-toolchain mingw-w64-$arch-cmake mingw-w64-$arch-gcc mingw-w64-$arch-python2
95
+ echo "##vso[task.prependpath]$(System.Workfolder)/msys2/mingw$MSYS_BITS/bin"
96
96
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
97
- displayName : Add MinGW to path
97
+ displayName : Download standard MinGW
98
98
99
99
# Make sure we use the native python interpreter instead of some msys equivalent
100
100
# one way or another. The msys interpreters seem to have weird path conversions
101
101
# baked in which break LLVM's build system one way or another, so let's use the
102
102
# native version which keeps everything as native as possible.
103
- - script : |
104
- copy C:\Python27amd64\python.exe C:\Python27amd64\python2.7.exe
105
- echo ##vso[task.prependpath]C:\Python27amd64
103
+ - bash : |
104
+ set -e
105
+ cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe
106
+ echo "##vso[task.prependpath]C:/Python27amd64"
106
107
displayName : Prefer the "native" Python as LLVM has trouble building with MSYS sometimes
107
108
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
108
109
109
110
# Note that this is originally from the github releases patch of Ninja
110
- - script : |
111
- md ninja
112
- powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15- ninja-win.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip"
113
- 7z x -oninja 2017-03-15-ninja-win.zip
114
- del 2017-03-15- ninja-win .zip
115
- set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable- ninja
116
- echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]% RUST_CONFIGURE_ARGS%
117
- echo ##vso[task.prependpath]%CD%\ ninja
111
+ - bash : |
112
+ set -e
113
+ mkdir ninja
114
+ curl -o ninja.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/ 2017-03-15-ninja-win.zip
115
+ 7z x -oninja ninja.zip
116
+ rm ninja.zip
117
+ echo " ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$ RUST_CONFIGURE_ARGS --enable-ninja"
118
+ echo " ##vso[task.prependpath]`pwd`/ ninja"
118
119
displayName : Download and install ninja
119
120
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
0 commit comments