[gha] use choco to install boost and openssl...

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2023-03-08 14:28:24 +00:00
parent ae9668312e
commit 745fda18bc
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2

View file

@ -1,11 +1,11 @@
name: Build on Windows name: Build on Windows with MSVC
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: build:
name: CMake MSVC name: Build
runs-on: windows-2019 runs-on: windows-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -19,39 +19,26 @@ jobs:
- name: Build and install zlib - 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 run: powershell -Command "(Invoke-WebRequest -Uri https://git.io/JnHTY -OutFile install_zlib.bat)"; ./install_zlib.bat; del install_zlib.bat
- name: Cache Boost - name: Install Boost
uses: actions/cache@v2 uses: crazy-max/ghaction-chocolatey@v2
with: with:
path: '${{ runner.workspace }}/boost_*.tar.gz' args: install boost-msvc-14.3
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 - name: Install OpenSSL
run: | uses: crazy-max/ghaction-chocolatey@v2
$Url = "https://slproweb.com/download/Win64OpenSSL-1_1_1t.exe" with:
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\openssl.exe") args: install openssl
Start-Process -Wait -FilePath "$env:TEMP\openssl.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\hostedtoolcache\windows\OpenSSL\1.1.1t"
- name: Build application - name: Configure
run: | working-directory: build
cd build run: cmake -G "Visual Studio 16 2019" .
cmake -G "Visual Studio 16 2019" .
cmake --build . --config Debug -- -m
env: 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 WITH_STATIC: ON
- name: Build
working-directory: build
run: cmake --build . --config Debug -- -m
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with: