Skip to content

Commit

Permalink
[appveyor] add build fix (#1520)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4sas authored May 22, 2020
1 parent 46ee427 commit 7864053
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
33 changes: 12 additions & 21 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions build/appveyor-msys2-upgrade.bash
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7864053

Please sign in to comment.