-
Notifications
You must be signed in to change notification settings - Fork 1.8k
59 lines (59 loc) · 2.05 KB
/
msvc-all-configs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Windows build with all configurations
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
msbuild:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
vsversion: [2019, 2022]
platform: [x64, Win32]
configuration: ['Release', 'Debug', 'Release (static runtime)', 'Debug (static runtime)']
unity: [unity, singles]
include:
- vsversion: 2019
os: windows-2019
boost_version: 77
- vsversion: 2022
os: windows-2022
boost_version: 85
steps:
- uses: actions/checkout@v4
- name: Setup MSVC++ environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
vsversion: ${{ matrix.vsversion }}
- name: Setup Boost
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.${{ matrix.boost_version }}.0/source/boost_1_${{ matrix.boost_version }}_0.zip"
(New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip")
Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local
Rename-Item -Path "C:\local\boost_1_${{ matrix.boost_version }}_0" -NewName "boost"
- name: Setup local properties
shell: cmd
run: |
COPY .ci\VS${{ matrix.vsversion }}.props .\Build.props
- name: Setup unity build
if: ${{ matrix.unity == 'unity' }}
shell: cmd
run: |
COPY .ci\Unity.props .\Directory.Build.props
- name: Build
run: |
msbuild ./QuantLib.sln /verbosity:normal /property:Configuration="${{ matrix.configuration }}" /property:Platform=${{ matrix.platform }}
- name: Test
if: ${{ contains(matrix.configuration, 'Release') }}
run: |
.\test-suite\bin\QuantLib-test-suite*.exe --log_level=message
- name: Run examples
if: ${{ contains(matrix.configuration, 'Release') }}
run: |
foreach ($file in Get-ChildItem -Path .\Examples\*.exe -Recurse)
{
& $file.FullName
if (!$?) { Exit $LASTEXITCODE }
}