diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-10-30 12:45:03 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2019-11-12 11:05:54 +0100 |
| commit | af6b26646b41e1b9614be12ae126f7033a3fa908 (patch) | |
| tree | f7c50e73e78e8b1159c0e5e9f6d5835da8335936 /src/ci/scripts | |
| parent | 53c2c04d63b3c043ec5b1b4f401e04868a1139a4 (diff) | |
| download | rust-af6b26646b41e1b9614be12ae126f7033a3fa908.tar.gz rust-af6b26646b41e1b9614be12ae126f7033a3fa908.zip | |
ci: remove the MSYS_BITS env var
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/install-mingw.sh | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh index 631d5e575a5..8b579587b9e 100755 --- a/src/ci/scripts/install-mingw.sh +++ b/src/ci/scripts/install-mingw.sh @@ -31,24 +31,34 @@ MINGW_ARCHIVE_32="i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z" MINGW_ARCHIVE_64="x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z" if isWindows; then + case "${CI_JOB_NAME}" in + *i686*) + bits=32 + arch=i686 + mingw_archive="${MINGW_ARCHIVE_32}" + ;; + *x86_64*) + bits=64 + arch=x86_64 + mingw_archive="${MINGW_ARCHIVE_64}" + ;; + *) + echo "src/ci/scripts/install-mingw.sh can't detect the builder's architecture" + echo "please tweak it to recognize the builder named '${CI_JOB_NAME}'" + exit 1 + ;; + esac + if [[ "${CUSTOM_MINGW-0}" -ne 1 ]]; then - arch=i686 - if [ "$MSYS_BITS" = "64" ]; then - arch=x86_64 - fi pacman -S --noconfirm --needed mingw-w64-$arch-toolchain mingw-w64-$arch-cmake \ mingw-w64-$arch-gcc mingw-w64-$arch-python2 - ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/mingw${MSYS_BITS}/bin" + ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/mingw${bits}/bin" else - mingw_archive="${MINGW_ARCHIVE_32}" - if [[ "${MSYS_BITS}" = "64" ]]; then - mingw_archive="${MINGW_ARCHIVE_64}" - fi - mingw_dir="mingw${MSYS_BITS}" + mingw_dir="mingw${bits}" curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" 7z x -y mingw.7z > /dev/null - curl -o "${mingw_dir}/bin/gdborig.exe" "${MIRRORS_BASE}/2017-04-20-${MSYS_BITS}bit-gdborig.exe" + curl -o "${mingw_dir}/bin/gdborig.exe" "${MIRRORS_BASE}/2017-04-20-${bits}bit-gdborig.exe" ciCommandAddPath "$(pwd)/${mingw_dir}/bin" fi fi |
