-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (65 loc) · 1.97 KB
/
windows-build-msvc.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build (Windows MSVC)
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
pull_request:
branches:
- main
jobs:
build-msvc:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
build_type: ["Release"]
shared_libs_enabled: ["ON", "OFF"]
config:
- {
os: windows-latest,
cc: "cl",
cxx: "cl"
}
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}\build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
if: matrix.shared_libs_enabled == 'OFF'
run: >
cmake
-S ${{ github.workspace }}
-B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs_enabled }}
- name: Build
if: matrix.shared_libs_enabled == 'OFF'
run: >
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
--config ${{ matrix.build_type }}
- name: Move demo data into binary dir
if: matrix.shared_libs_enabled == 'OFF'
shell: cmd
run: >
move /y
${{ steps.strings.outputs.build-output-dir }}\bin\demo-audio\${{ matrix.build_type }}\demo-audio.exe
${{ steps.strings.outputs.build-output-dir }}\bin\demo-audio
- name: Create editor launch script
if: matrix.shared_libs_enabled == 'OFF'
shell: cmd
run: |
echo start .\demo-audio.exe --editor > ${{ steps.strings.outputs.build-output-dir }}\bin\demo-audio\demo-audio-editor.bat
- name: Upload Build Artifact
if: matrix.shared_libs_enabled == 'OFF'
uses: actions/upload-artifact@v4
with:
name: windows-msvc-x64
path: '${{ steps.strings.outputs.build-output-dir }}\bin'
if-no-files-found: error
compression-level: 9