diff --git a/.appveyor.yml b/.appveyor.yml index 1ce514fb0c..09f918139a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -15,8 +15,11 @@ skip_commits: - .travis.yml - '*.md' -#cache: -# - C:\msys64\var\cache\pacman\pkg\mingw-w64-x86_64-qt4* -> .appveyor.yml +cache: + # cache pacman packages + # max cache size is 1 GB, which should be enough + # but in case we could cache only mingw-w64-*-qt4-* + - C:\msys64\var\cache\pacman\pkg\ -> .appveyor.yml install: @@ -32,9 +35,23 @@ install: - bash -lc "pacman --version" - bash -lc "pacman -Q" # Switch from SF to msys2.org (default, much faster) - - bash -lc "pacman --noconfirm --sync pacman-mirrors" - - bash -lc "pacman --noconfirm -S autoconf automake bison flex" - - bash -lc "pacman --noconfirm -S mingw-w64-$MARCH-qt4" + - bash -lc "pacman --noconfirm --needed --sync pacman-mirrors" + - bash -lc "pacman --noconfirm --needed -S autoconf automake bison flex" + #- bash -lc "pacman --noconfirm --needed -S mingw-w64-$MARCH-qt4" + # Qt4 was removed from MSYS2, see + # https://github.com/msys2/MINGW-packages/issues/3881 + # and https://github.com/slowphil/texmacs-win-builder/issues/3 for the "fix" + # copied below + # pacman no longer finds qt4 probably because of https://github.com/msys2/MINGW-packages/issues/3881 + # nevertheless the binary still exists in the repo (for the moment) + # https://msys2.duckdns.org/repos + # https://wiki.archlinux.org/index.php/offline_installation_of_packages + # + # download package directly into the local pacman packages directory, cached by AppVeyor + # make sure pacman packages directory exists (may not be there if no packages downloaded yet) + - bash -lc "mkdir -p /var/cache/pacman/pkg" + # use "no-clobber" option for wget since the file could/should already be in the cache + - bash -lc "cd /var/cache/pacman/pkg && wget -nc http://repo.msys2.org/mingw/$MARCH/mingw-w64-$MARCH-qt4-4.8.7-4-any.pkg.tar.xz && pacman --noconfirm --needed -U mingw-w64-$MARCH-qt4-4.8.7-4-any.pkg.tar.xz" # Set compiler (64bit) - set "CC=/c/msys64/mingw%MBITS%/bin/gcc.exe"