Skip to content

Commit db00787

Browse files
committed
ci: split install-msys2 step into two separate scripts
1 parent 9d15336 commit db00787

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

src/ci/azure-pipelines/steps/run.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ steps:
9898
displayName: Install msys2
9999
condition: and(succeeded(), not(variables.SKIP_JOB))
100100

101+
- bash: src/ci/scripts/install-msys2-packages.sh
102+
env:
103+
AGENT_OS: $(Agent.OS)
104+
SYSTEM_WORKFOLDER: $(System.Workfolder)
105+
displayName: Install msys2 packages
106+
condition: and(succeeded(), not(variables.SKIP_JOB))
107+
101108
- bash: src/ci/scripts/install-mingw.sh
102109
env:
103110
AGENT_OS: $(Agent.OS)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
IFS=$'\n\t'
5+
6+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
7+
8+
if isWindows; then
9+
pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar
10+
11+
# FIXME(#65767): workaround msys bug, step 2
12+
arch=i686
13+
if [ "$MSYS_BITS" = "64" ]; then
14+
arch=x86_64
15+
fi
16+
pacman -U --noconfirm --noprogressbar mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
17+
rm mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
18+
19+
# Make sure we use the native python interpreter instead of some msys equivalent
20+
# one way or another. The msys interpreters seem to have weird path conversions
21+
# baked in which break LLVM's build system one way or another, so let's use the
22+
# native version which keeps everything as native as possible.
23+
cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe
24+
ciCommandAddPath "C:\\Python27amd64"
25+
fi

src/ci/scripts/install-msys2.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,4 @@ if isWindows; then
2323
mkdir -p "${SYSTEM_WORKFOLDER}/msys2/home/${USERNAME}"
2424

2525
ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/usr/bin"
26-
export PATH="${SYSTEM_WORKFOLDER}/msys2/usr/bin:${PATH}"
27-
28-
pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar
29-
30-
# FIXME(#65767): workaround msys bug, step 2
31-
pacman -U --noconfirm --noprogressbar mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
32-
rm mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
33-
34-
# Make sure we use the native python interpreter instead of some msys equivalent
35-
# one way or another. The msys interpreters seem to have weird path conversions
36-
# baked in which break LLVM's build system one way or another, so let's use the
37-
# native version which keeps everything as native as possible.
38-
cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe
39-
ciCommandAddPath "C:\\Python27amd64"
4026
fi

0 commit comments

Comments
 (0)