From 78640532e1c0e50b122df45702e9861e6402d2af Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 22 May 2020 13:01:25 +0000 Subject: [PATCH] [appveyor] add build fix (#1520) Add fix due to msys2/MSYS2-packages#1967 --- appveyor.yml | 33 +++++++++++-------------------- build/appveyor-msys2-upgrade.bash | 10 ++++++++++ 2 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 build/appveyor-msys2-upgrade.bash diff --git a/appveyor.yml b/appveyor.yml index d6dcf060..45a16dd8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,34 +14,25 @@ environment: CHERE_INVOKING: enabled_from_arguments matrix: - MSYSTEM: MINGW64 + MSYS_PACKAGES: mingw-w64-x86_64-boost mingw-w64-x86_64-miniupnpc + MSYS_BITNESS: 64 - MSYSTEM: MINGW32 + MSYS_PACKAGES: mingw-w64-i686-boost mingw-w64-i686-miniupnpc + MSYS_BITNESS: 32 install: - c:\msys64\usr\bin\bash -lc "pacman --noconfirm -Rns gcc-fortran gcc mingw-w64-{i686,x86_64}-gcc-ada mingw-w64-{i686,x86_64}-gcc-objc" +# TODO: revert that change when appveyor's images will be updated +- c:\msys64\usr\bin\bash -l "build/appveyor-msys2-upgrade.bash" +# update runtime - c:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu" - -- c:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu" - -- if "%MSYSTEM%" == "MINGW64" ( - c:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-x86_64-boost mingw-w64-x86_64-miniupnpc" - ) else ( - c:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-boost mingw-w64-i686-miniupnpc" - ) - -- if "%MSYSTEM%" == "MINGW64" ( - set "bitness=64" - ) else ( - set "bitness=32" - ) +# update packages and install required +- c:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu ${MSYS_PACKAGES}" build_script: -- cmd: >- - cd \projects\i2pd - - echo MSYSTEM = %MSYSTEM%, bitness = %bitness% - -- c:\msys64\usr\bin\bash -lc "make USE_UPNP=yes -j2" -- 7z a -tzip -mx9 -mmt i2pd-mingw-win%bitness%.zip i2pd.exe +- echo MSYSTEM = %MSYSTEM%, bitness = %MSYS_BITNESS% +- c:\msys64\usr\bin\bash -lc "make USE_UPNP=yes -j3" +- 7z a -tzip -mx9 -mmt i2pd-mingw-win%MSYS_BITNESS%.zip i2pd.exe test: off diff --git a/build/appveyor-msys2-upgrade.bash b/build/appveyor-msys2-upgrade.bash new file mode 100644 index 00000000..20c6af69 --- /dev/null +++ b/build/appveyor-msys2-upgrade.bash @@ -0,0 +1,10 @@ +set -e -x + +base_url='http://repo.msys2.org/msys/x86_64/' +packages="libzstd-1.4.4-2-x86_64.pkg.tar.xz pacman-5.2.1-6-x86_64.pkg.tar.xz zstd-1.4.4-2-x86_64.pkg.tar.xz" +for p in $packages +do + curl "${base_url}$p" -o "$p" +done +pacman -U --noconfirm $packages +rm -f $packages