update windows workflow #64
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: | |
- ./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 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 | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.2 || 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_BUILD_DOC=false -DBOOST_INCLUDEDIR=C:\local\boost -DBOOST_LIBRARYDIR=C:\local\boost\lib${{ matrix.boost-lib }}-msvc-14.2 -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 |