-
-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (51 loc) · 1.92 KB
/
build-windows-portable.yml
File metadata and controls
57 lines (51 loc) · 1.92 KB
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
name: Build Windows Portable
on:
workflow_dispatch:
workflow_call:
jobs:
build:
name: Build Windows Portable
runs-on: windows-2022
steps:
# Install build dependencies
- name: Install Qt6.8.3
uses: jurplel/install-qt-action@v4
with:
# See https://ddalcino.github.io/aqt-list-server/
aqtversion: '==3.1.*'
version: '6.8.3'
modules: 'qtmultimedia'
cache: true
cache-key-prefix: install-qt-6.8.3-action-${{ runner.os }}
- name: Install Ninja Build System
run: choco install ninja
- name: Setup MSVC 2022 for C++ (Windows)
# See supported versions here: https://doc.qt.io/qt-6/windows.html
# See here on what this does: https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line
uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: '2022'
# Checkout the repository
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Build and package
- name: Build and package
run: |
$env:CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
./devscripts/clean-build.bat
./devscripts/make-portable.bat
- name: Get version from CMakeLists.txt
id: get_version
shell: bash
run: |
# See here why we need to set LC_ALL: https://stackoverflow.com/questions/61456142
export LC_ALL=en_US.utf8
echo "version=v$(grep -oP 'project\(GlyphVisualizer VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: GlyphVisualizer-${{ steps.get_version.outputs.version }}_windows-x64-portable
path: |
./build/GlyphVisualizer*_windows-x64-portable.zip
./build/GlyphVisualizer*_windows-x64-portable.zip.sha256.txt