-
Notifications
You must be signed in to change notification settings - Fork 19
98 lines (89 loc) · 2.97 KB
/
windows.yaml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Windows
on:
push:
paths:
- "*.txt"
- "src/**"
- "!**.qml"
- "!**.md"
- "!**.cmake"
- ".github/**"
pull_request:
paths:
- "src/**"
- "!**.qml"
- "!**.md"
- "!**.cmake"
workflow_dispatch:
permissions: write-all
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
include:
- qt_ver: 6.6.1
qt_arch: win64_msvc2019_64
msvc_arch: x64
qt_arch_isntall: msvc2019_64
env:
targetName: sast_music.exe
fileName: sast-music
QT_MODULES: "qt5compat qthttpserver qtshadertools qtmultimedia"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
cache: ${{steps.cache-qt.outputs.cache-hit}}
modules: ${{env.QT_MODULES}}
- name: msvc build
id: build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }}
ninja --version
mkdir build
cd build
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=%Qt6_DIR% -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja ..
cmake --build . --target all --config Release --parallel
echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV%
echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV%
echo vcToolsInstallDir=%VCToolsInstallDir% >> %GITHUB_ENV%
echo vcToolsRedistDir=%VCToolsRedistDir% >> %GITHUB_ENV%
- name: package
if: startsWith(github.event.ref, 'refs/tags/')
id: package
env:
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}
msvcArch: ${{ matrix.msvc_arch }}
shell: pwsh
run: |
& scripts\windows-publish.ps1 ${env:archiveName} ${env:targetName}
$name = ${env:archiveName}
echo "::set-output name=packageName::$name"
- uses: actions/upload-artifact@v2
if: startsWith(github.event.ref, 'refs/tags/')
with:
name: ${{ steps.package.outputs.packageName }}
path: dist
- name: inno setup install
if: startsWith(github.event.ref, 'refs/tags/')
uses: zhuzichu520/[email protected]
with:
filepath: ./action-cli/InstallerScript.iss
- name: upload release
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./action-cli/installer.exe
asset_name: ${{ env.fileName }}_win32.exe
tag: ${{ github.ref }}
overwrite: true