-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (56 loc) · 1.85 KB
/
cmake.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
name: CMake
permissions:
contents: write
on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup zlib
shell: pwsh
run: |
vcpkg install zlib:x64-windows zlib:x64-windows-static
- name: Cache qt static build
id: cache-qt-static-build
uses: actions/cache@v4
with:
path: Qt6Static
key: ${{ runner.os }}-Qt6Static
- name: Download and unzip qt static build
shell: pwsh
if: steps.cache-qt-static-build.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri www.atarismwc.com/Qt6Static.7z -OutFile Qt6Static.7z
7z x -oQt6Static Qt6Static.7z -y
- name: Configure CMake
env:
CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTATIC_QT_DIR=${{github.workspace}}/Qt6Static -DCFGEDITOR_BUILD_STATIC=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: CFGEditorPlusPlus
path: ${{github.workspace}}/build/Release/CFGEditorPlusPlus.exe
- name: Move artifact
shell: pwsh
if: startsWith(github.ref, 'refs/tags')
run: |
Move-Item -Path ${{github.workspace}}/build/Release/CFGEditorPlusPlus.exe -Destination ${{github.workspace}}/CFGEditorPlusPlus.exe
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags')
with:
generate_release_notes: true
prerelease: true
files: CFGEditorPlusPlus.exe