ci: split install-msys2 step into two separate scripts
This commit is contained in:
parent
9d15336149
commit
db0078706b
3 changed files with 32 additions and 14 deletions
|
@ -98,6 +98,13 @@ steps:
|
|||
displayName: Install msys2
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB))
|
||||
|
||||
- bash: src/ci/scripts/install-msys2-packages.sh
|
||||
env:
|
||||
AGENT_OS: $(Agent.OS)
|
||||
SYSTEM_WORKFOLDER: $(System.Workfolder)
|
||||
displayName: Install msys2 packages
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB))
|
||||
|
||||
- bash: src/ci/scripts/install-mingw.sh
|
||||
env:
|
||||
AGENT_OS: $(Agent.OS)
|
||||
|
|
25
src/ci/scripts/install-msys2-packages.sh
Executable file
25
src/ci/scripts/install-msys2-packages.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
|
||||
|
||||
if isWindows; then
|
||||
pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar
|
||||
|
||||
# FIXME(#65767): workaround msys bug, step 2
|
||||
arch=i686
|
||||
if [ "$MSYS_BITS" = "64" ]; then
|
||||
arch=x86_64
|
||||
fi
|
||||
pacman -U --noconfirm --noprogressbar mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
|
||||
rm mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
|
||||
|
||||
# Make sure we use the native python interpreter instead of some msys equivalent
|
||||
# one way or another. The msys interpreters seem to have weird path conversions
|
||||
# baked in which break LLVM's build system one way or another, so let's use the
|
||||
# native version which keeps everything as native as possible.
|
||||
cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe
|
||||
ciCommandAddPath "C:\\Python27amd64"
|
||||
fi
|
|
@ -23,18 +23,4 @@ if isWindows; then
|
|||
mkdir -p "${SYSTEM_WORKFOLDER}/msys2/home/${USERNAME}"
|
||||
|
||||
ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/usr/bin"
|
||||
export PATH="${SYSTEM_WORKFOLDER}/msys2/usr/bin:${PATH}"
|
||||
|
||||
pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar
|
||||
|
||||
# FIXME(#65767): workaround msys bug, step 2
|
||||
pacman -U --noconfirm --noprogressbar mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
|
||||
rm mingw-w64-$arch-ca-certificates-20180409-1-any.pkg.tar.xz
|
||||
|
||||
# Make sure we use the native python interpreter instead of some msys equivalent
|
||||
# one way or another. The msys interpreters seem to have weird path conversions
|
||||
# baked in which break LLVM's build system one way or another, so let's use the
|
||||
# native version which keeps everything as native as possible.
|
||||
cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe
|
||||
ciCommandAddPath "C:\\Python27amd64"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue