diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-10-22 16:40:54 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2019-10-25 16:47:41 +0200 |
| commit | db0078706b47f7ee0e492a15995ae55ae70c086d (patch) | |
| tree | a6acc7a99dcf2536ba336d77ac361c6f1d2799a8 /src/ci/scripts | |
| parent | 9d1533614949eae7154da51be8b9739fe857e3e0 (diff) | |
| download | rust-db0078706b47f7ee0e492a15995ae55ae70c086d.tar.gz rust-db0078706b47f7ee0e492a15995ae55ae70c086d.zip | |
ci: split install-msys2 step into two separate scripts
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/install-msys2-packages.sh | 25 | ||||
| -rwxr-xr-x | src/ci/scripts/install-msys2.sh | 14 |
2 files changed, 25 insertions, 14 deletions
diff --git a/src/ci/scripts/install-msys2-packages.sh b/src/ci/scripts/install-msys2-packages.sh new file mode 100755 index 00000000000..375f13f30b3 --- /dev/null +++ b/src/ci/scripts/install-msys2-packages.sh @@ -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 diff --git a/src/ci/scripts/install-msys2.sh b/src/ci/scripts/install-msys2.sh index 70a73df4e65..3178d3e22e1 100755 --- a/src/ci/scripts/install-msys2.sh +++ b/src/ci/scripts/install-msys2.sh @@ -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 |
