mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-08-27 02:30:33 +01:00
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: Build on Windows
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
name: CMake MSVC
|
|
runs-on: windows-2019
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Build and install zlib
|
|
run: powershell -Command "(Invoke-WebRequest -Uri https://git.io/JnHTY -OutFile install_zlib.bat)"; ./install_zlib.bat; del install_zlib.bat
|
|
|
|
- name: Cache Boost
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: '${{ runner.workspace }}/boost_*.tar.gz'
|
|
key: 'boost-1.81.0'
|
|
|
|
- name: Build Boost
|
|
id: boost
|
|
uses: egor-tensin/build-boost@v1
|
|
with:
|
|
version: 1.81.0
|
|
libraries: date_time filesystem program_options system
|
|
static: 1
|
|
platform: x64
|
|
configuration: Debug
|
|
|
|
- name: Install OpenSSL
|
|
run: |
|
|
$Url = "https://slproweb.com/download/Win64OpenSSL-1_1_1t.exe"
|
|
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\openssl.exe")
|
|
Start-Process -Wait -FilePath "$env:TEMP\openssl.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\hostedtoolcache\windows\OpenSSL\1.1.1t"
|
|
|
|
- name: Build application
|
|
run: |
|
|
cd build
|
|
cmake -G "Visual Studio 16 2019" .
|
|
cmake --build . --config Debug -- -m
|
|
env:
|
|
OPENSSL_ROOT_DIR: C:\hostedtoolcache\windows\OpenSSL\1.1.1t
|
|
BOOST_ROOT: ${{ steps.boost.outputs.root }}
|
|
BOOST_LIBRARYDIR: ${{ steps.boost.outputs.librarydir }}
|
|
WITH_STATIC: ON
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: i2pd-msvc.zip
|
|
path: build/Debug/i2pd.*
|
|
|