-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.74 KB
/
build-and-release-windows.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
name: Build and Release PlatypusGui
on:
push:
branches:
- main
jobs:
build:
name: Build and Upload Artifacts
runs-on: windows-latest
steps:
# Get dependencies
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies via vcpkg
run: vcpkg.exe install --triplet x64-windows
- name: Cache vcpkg
uses: actions/cache@v3
with:
path: |
vcpkg
vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }}
- name: Get Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '3.16'
- name: Set up MSVC environment
shell: cmd
run: |
call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath > vs_install_dir.txt
set /p InstallDir=<vs_install_dir.txt
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" x64
# Configure CMake (Windows)
- name: Configure CMake (Windows)
shell: cmd
run: |
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
# 4. Build the project
- name: Build PlatypusGui
run: cmake --build build --config Release --target PlatypusGui
- name: Deploy Qt Dependencies (Windows)
shell: cmd
run: |
set QT_DIR=C:\Qt\5.15.2\msvc2019_64
set PATH=%QT_DIR%\bin;%PATH%
windeployqt.exe --compiler-runtime --dir build\deployment build\PlatypusGui.exe
# 6. Upload artifacts for release
- name: Upload Release Artifacts
uses: actions/upload-artifact@v3
with:
name: windows-latest-platypus
path: build\deployment\PlatypusGui.exe