Merge branch 'github-214' into 'master' #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI Windows | |
on: | |
push: | |
branches: [master] | |
tags: | |
- 'v*' | |
release: | |
types: [published] | |
pull_request: | |
branches: [master] | |
types: [ready_for_review, opened, synchronize, reopened] | |
paths: | |
- .github/workflows/linux_build.yaml | |
- ./App/** | |
- ./OREAnalytics/** | |
- '!./OREAnalytics/doc/**' | |
- ./OREData/** | |
- '!./OREData/doc/**' | |
- ./ORETest/** | |
- ./QuantExt/** | |
- '!./QuantExt/doc/**' | |
- CMakeLists.txt | |
workflow_dispatch: | |
jobs: | |
build: | |
name: building | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
include: | |
- arch: x86 | |
platform: Win32 | |
boost-lib: 32 | |
- arch: AMD64 | |
platform: x64 | |
boost-lib: 64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: get QuantLib | |
run: | | |
git submodule update --init | |
- name: Set up zlib | |
run: | | |
$Url = "https://www.zlib.net/zlib131.zip" | |
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\zlib.zip") | |
Expand-Archive -Path "$env:TEMP\zlib.zip" -DestinationPath C:\local | |
cd C:\local\zlib-1.3.1 | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --config Release | |
- name: Set up Boost | |
run: | | |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.72.0/binaries/boost_1_72_0-msvc-14.2-${{ matrix.boost-lib }}.exe" | |
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") | |
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost" | |
choco install -y ninja | |
- name: cmake configure and build | |
env: | |
BOOST_ROOT: C:\local\boost | |
shell: cmd | |
run: | | |
mkdir build | |
cd build | |
SET ZLIB_ROOT=C:\local\zlib-1.3.1 | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.3 || exit 1 | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_USE_ZLIB=ON -DORE_BUILD_DOC=false -DBOOST_INCLUDEDIR=C:\local\boost -DZLIB_LIBRARY=C:\local\zlib-1.3.1\build\Release\zlib.lib -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L | |
cmake --build . -j 2 --verbose | |
- name: Save executables as artifacts | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ore-windows-${{ matrix.arch }} | |
path: D:\a\Engine\Engine\build\App\ore.exe |