2020-10-14 05:06:22 +00:00
|
|
|
name: Build on Windows
|
|
|
|
|
2024-02-24 23:35:56 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
paths:
|
|
|
|
- .github/workflows/build-windows.yml
|
|
|
|
- build/CMakeLists.txt
|
|
|
|
- build/cmake_modules/**
|
|
|
|
- daemon/**
|
|
|
|
- i18n/**
|
|
|
|
- libi2pd/**
|
|
|
|
- libi2pd_client/**
|
|
|
|
- Win32/**
|
|
|
|
- Makefile
|
|
|
|
- Makefile.mingw
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
2020-10-14 05:06:22 +00:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-03-10 01:32:07 +00:00
|
|
|
name: ${{ matrix.arch }}
|
2020-10-14 05:06:22 +00:00
|
|
|
runs-on: windows-latest
|
2023-02-26 20:38:23 +00:00
|
|
|
|
2020-10-14 05:06:22 +00:00
|
|
|
strategy:
|
2023-02-26 20:38:23 +00:00
|
|
|
fail-fast: false
|
2020-10-14 05:06:22 +00:00
|
|
|
matrix:
|
|
|
|
include: [
|
2023-02-26 20:38:23 +00:00
|
|
|
{ msystem: UCRT64, arch: ucrt-x86_64, arch_short: x64-ucrt, compiler: gcc },
|
|
|
|
{ msystem: CLANG64, arch: clang-x86_64, arch_short: x64-clang, compiler: clang },
|
|
|
|
{ msystem: MINGW64, arch: x86_64, arch_short: x64, compiler: gcc },
|
|
|
|
{ msystem: MINGW32, arch: i686, arch_short: x86, compiler: gcc }
|
2020-10-14 05:06:22 +00:00
|
|
|
]
|
2023-02-26 20:38:23 +00:00
|
|
|
|
2020-10-14 05:06:22 +00:00
|
|
|
steps:
|
2023-02-26 20:38:23 +00:00
|
|
|
- name: Checkout
|
2024-04-27 13:49:48 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-26 20:38:23 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2020-10-14 05:06:22 +00:00
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.msystem }}
|
2023-02-26 20:38:23 +00:00
|
|
|
install: base-devel git mingw-w64-${{ matrix.arch }}-${{ matrix.compiler }} mingw-w64-${{ matrix.arch }}-boost mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-miniupnpc
|
2020-10-14 05:06:22 +00:00
|
|
|
update: true
|
2023-02-26 20:38:23 +00:00
|
|
|
|
|
|
|
- name: Install additional clang packages
|
|
|
|
if: ${{ matrix.msystem == 'CLANG64' }}
|
|
|
|
run: pacman --noconfirm -S mingw-w64-${{ matrix.arch }}-gcc-compat
|
|
|
|
|
2021-11-18 13:17:28 +00:00
|
|
|
- name: Build application
|
2020-11-17 18:39:46 +00:00
|
|
|
run: |
|
|
|
|
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
2021-11-18 13:17:28 +00:00
|
|
|
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes -j3
|
2023-02-26 20:38:23 +00:00
|
|
|
|
2021-02-26 21:09:01 +00:00
|
|
|
- name: Upload artifacts
|
2024-04-27 13:49:48 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-02-26 21:09:01 +00:00
|
|
|
with:
|
2021-11-18 13:17:28 +00:00
|
|
|
name: i2pd-${{ matrix.arch_short }}.exe
|
2021-02-26 21:09:01 +00:00
|
|
|
path: i2pd.exe
|
2023-02-26 20:38:23 +00:00
|
|
|
|
|
|
|
build-cmake:
|
2023-03-10 01:32:07 +00:00
|
|
|
name: CMake ${{ matrix.arch }}
|
2023-02-26 20:38:23 +00:00
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include: [
|
|
|
|
{ msystem: UCRT64, arch: ucrt-x86_64, arch_short: x64-ucrt, compiler: gcc },
|
|
|
|
{ msystem: CLANG64, arch: clang-x86_64, arch_short: x64-clang, compiler: clang },
|
|
|
|
{ msystem: MINGW64, arch: x86_64, arch_short: x64, compiler: gcc },
|
|
|
|
{ msystem: MINGW32, arch: i686, arch_short: x86, compiler: gcc }
|
|
|
|
]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-04-27 13:49:48 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-26 20:38:23 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.msystem }}
|
|
|
|
install: base-devel git mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-ninja mingw-w64-${{ matrix.arch }}-${{ matrix.compiler }} mingw-w64-${{ matrix.arch }}-boost mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-miniupnpc
|
|
|
|
update: true
|
|
|
|
|
|
|
|
- name: Build application
|
|
|
|
run: |
|
|
|
|
cd build
|
|
|
|
cmake -DWITH_GIT_VERSION=ON -DWITH_STATIC=ON -DWITH_UPNP=ON -DCMAKE_BUILD_TYPE=Release .
|
|
|
|
cmake --build . -- -j3
|
|
|
|
|
|
|
|
- name: Upload artifacts
|
2024-04-27 13:49:48 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-02-26 20:38:23 +00:00
|
|
|
with:
|
|
|
|
name: i2pd-cmake-${{ matrix.arch_short }}.exe
|
|
|
|
path: build/i2pd.exe
|
|
|
|
|
2022-03-16 00:42:00 +00:00
|
|
|
build-xp:
|
2023-03-10 01:32:07 +00:00
|
|
|
name: XP
|
2022-03-16 00:42:00 +00:00
|
|
|
runs-on: windows-latest
|
2023-02-26 20:38:23 +00:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
|
2022-03-16 00:42:00 +00:00
|
|
|
steps:
|
2023-02-26 20:38:23 +00:00
|
|
|
- name: Checkout
|
2024-04-27 13:49:48 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-26 20:38:23 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-03-16 00:42:00 +00:00
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: MINGW32
|
2022-03-16 00:45:55 +00:00
|
|
|
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-miniupnpc
|
2022-03-16 00:42:00 +00:00
|
|
|
update: true
|
2023-02-26 20:38:23 +00:00
|
|
|
|
2022-03-16 00:42:00 +00:00
|
|
|
- name: Build WinXP-capable CRT packages
|
|
|
|
run: |
|
2022-03-16 00:51:21 +00:00
|
|
|
git clone https://github.com/msys2/MINGW-packages
|
2022-03-16 00:42:00 +00:00
|
|
|
pushd MINGW-packages
|
|
|
|
pushd mingw-w64-headers-git
|
|
|
|
sed -i 's/0x601/0x501/' PKGBUILD
|
2022-03-16 01:03:26 +00:00
|
|
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm
|
2022-03-16 01:09:23 +00:00
|
|
|
pacman --noconfirm -U mingw-w64-i686-headers-git-*-any.pkg.tar.zst
|
2022-03-16 00:42:00 +00:00
|
|
|
popd
|
|
|
|
pushd mingw-w64-crt-git
|
2022-03-16 01:03:26 +00:00
|
|
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm
|
2022-03-16 01:09:23 +00:00
|
|
|
pacman --noconfirm -U mingw-w64-i686-crt-git-*-any.pkg.tar.zst
|
2022-03-16 00:42:00 +00:00
|
|
|
popd
|
|
|
|
pushd mingw-w64-winpthreads-git
|
2022-03-16 01:03:26 +00:00
|
|
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm
|
2022-03-16 01:09:23 +00: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 00:42:00 +00:00
|
|
|
popd
|
|
|
|
popd
|
2023-02-26 20:38:23 +00:00
|
|
|
|
2022-03-16 00:42:00 +00:00
|
|
|
- name: Build application
|
|
|
|
run: |
|
|
|
|
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
2022-03-16 01:29:02 +00:00
|
|
|
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes USE_WINXP_FLAGS=yes -j3
|
2023-02-26 20:38:23 +00:00
|
|
|
|
2022-03-16 00:42:00 +00:00
|
|
|
- name: Upload artifacts
|
2024-04-27 13:49:48 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-03-16 00:42:00 +00:00
|
|
|
with:
|
|
|
|
name: i2pd-xp.exe
|
|
|
|
path: i2pd.exe
|