2020-10-14 08:06:22 +03:00
|
|
|
name: Build on Windows
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-11-18 16:17:28 +03:00
|
|
|
name: Building using ${{ matrix.arch }} toolchain
|
2020-10-14 08:06:22 +03:00
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
include: [
|
2022-02-01 15:42:57 +03:00
|
|
|
{ msystem: UCRT64, arch: ucrt-x86_64, arch_short: x64-ucrt },
|
|
|
|
{ msystem: MINGW64, arch: x86_64, arch_short: x64 },
|
|
|
|
{ msystem: MINGW32, arch: i686, arch_short: x86 }
|
2020-10-14 08:06:22 +03:00
|
|
|
]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.msystem }}
|
2020-10-14 08:14:33 +03:00
|
|
|
install: base-devel mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-boost mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-miniupnpc
|
2020-10-14 08:06:22 +03:00
|
|
|
update: true
|
2021-11-18 16:17:28 +03:00
|
|
|
- name: Build application
|
2020-11-17 21:39:46 +03:00
|
|
|
run: |
|
|
|
|
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
2021-11-18 16:17:28 +03:00
|
|
|
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes -j3
|
2021-02-27 00:09:01 +03:00
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-11-18 16:17:28 +03:00
|
|
|
name: i2pd-${{ matrix.arch_short }}.exe
|
2021-02-27 00:09:01 +03:00
|
|
|
path: i2pd.exe
|
2022-03-16 03:42:00 +03:00
|
|
|
build-xp:
|
|
|
|
name: Building for Windows XP
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: MINGW32
|
2022-03-16 03:45:55 +03:00
|
|
|
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-miniupnpc
|
2022-03-16 03:42:00 +03:00
|
|
|
update: true
|
|
|
|
- name: Build WinXP-capable CRT packages
|
|
|
|
run: |
|
2022-03-16 03:51:21 +03:00
|
|
|
git clone https://github.com/msys2/MINGW-packages
|
2022-03-16 03:42:00 +03:00
|
|
|
pushd MINGW-packages
|
|
|
|
pushd mingw-w64-headers-git
|
|
|
|
sed -i 's/0x601/0x501/' PKGBUILD
|
2022-03-16 04:03:26 +03:00
|
|
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm
|
2022-03-16 04:09:23 +03:00
|
|
|
pacman --noconfirm -U mingw-w64-i686-headers-git-*-any.pkg.tar.zst
|
2022-03-16 03:42:00 +03:00
|
|
|
popd
|
|
|
|
pushd mingw-w64-crt-git
|
2022-03-16 04:03:26 +03:00
|
|
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm
|
2022-03-16 04:09:23 +03:00
|
|
|
pacman --noconfirm -U mingw-w64-i686-crt-git-*-any.pkg.tar.zst
|
2022-03-16 03:42:00 +03:00
|
|
|
popd
|
|
|
|
pushd mingw-w64-winpthreads-git
|
2022-03-16 04:03:26 +03:00
|
|
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm
|
2022-03-16 04:09:23 +03:00
|
|
|
pacman --noconfirm -U mingw-w64-i686-libwinpthread-git-*-any.pkg.tar.zst mingw-w64-i686-winpthreads-git-*-any.pkg.tar.zst
|
2022-03-16 03:42:00 +03:00
|
|
|
popd
|
|
|
|
popd
|
|
|
|
- name: Build application
|
|
|
|
run: |
|
|
|
|
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
2022-03-16 04:29:02 +03:00
|
|
|
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes USE_WINXP_FLAGS=yes -j3
|
2022-03-16 03:42:00 +03:00
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: i2pd-xp.exe
|
|
|
|
path: i2pd.exe
|