-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (29 loc) · 1 KB
/
cmake-windows-package.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
name: Windows Release Package
on:
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Prep License File for Distribution
run: cp LICENSE License.txt
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_FLAGS="/O2 /EHsc /Gs /guard:cf"
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C Release
- name: Package
working-directory: ${{github.workspace}}/build/
run: cpack
- name: Archive Build Artifacts
uses: actions/upload-artifact@v4
with:
name: windows-2022
path: |
${{github.workspace}}/build/sac-format.exe*
retention-days: 1