-
-
Notifications
You must be signed in to change notification settings - Fork 3k
110 lines (96 loc) · 3.47 KB
/
windows-qt6.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
name: 🪟 Windows Qt6
on:
push:
branches:
- master
- release-**
pull_request:
release:
types: ['published']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build (windows)
runs-on: windows-2022
steps:
- name: 🐣 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: 🐩 Install CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.29.2
- name: 🧽 Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
with:
# See https://github.com/actions/runner-images/issues/9398
toolset: 14.39
- name: Setup vcpkg
uses: ./.github/actions/setup-vcpkg
- name: Setup flex/bison
uses: robinraju/release-downloader@v1.10
with:
repository: 'lexxmark/winflexbison'
fileName: '*.zip'
# v2.5.25 is broken and will lead to random build failures because of race conditions, see https://github.com/lexxmark/winflexbison/issues/86
tag: 'v2.5.24'
extract: true
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 1G
- name: 🌱 Install dependencies and generate project files
shell: bash
run: |
BUILD_DIR=$( cygpath "${{ github.workspace }}/build" )
SOURCE_DIR=$( cygpath "${{ github.workspace }}" )
cmake -S "${SOURCE_DIR}" \
-B "${BUILD_DIR}" \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D WITH_VCPKG=ON \
-D CREATE_ZIP=ON \
-D VCPKG_TARGET_TRIPLET=x64-windows-release \
-D VCPKG_HOST_TRIPLET=x64-windows-release \
-D WITH_DESKTOP=ON \
-D WITH_3D=ON \
-D WITH_BINDINGS=ON \
-D ENABLE_TESTS=OFF \
-D BUILD_WITH_QT6=ON \
-D USE_CCACHE=ON \
-D FLEX_EXECUTABLE="${SOURCE_DIR}/win_flex.exe" \
-D BISON_EXECUTABLE="${SOURCE_DIR}/win_bison.exe" \
-D SIP_BUILD_EXECUTABLE="${BUILD_DIR}\vcpkg_installed\x64-windows-release\tools\python3\Scripts\sip-build.exe" \
-D PYUIC_PROGRAM="${BUILD_DIR}\vcpkg_installed\x64-windows-release\tools\python3\pyuic5.bat" \
-D PYRCC_PROGRAM="${BUILD_DIR}\vcpkg_installed\x64-windows-release\tools\python3\pyrcc5.bat" \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D WITH_QTWEBKIT=OFF \
-D VCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:/src" \
-D NUGET_USERNAME=qgis \
-D NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }}
- name: 🌋 Build
shell: bash
run: |
cmake --build "${{ github.workspace }}/build" --config Release
- name: 📦 Package
shell: bash
run: |
cmake --build "${{ github.workspace }}/build" --target bundle --config Release
- name: 📑 Upload dep build logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-logs-x64-windows
path: |
C:/src/**/*.log
- name: 📤 Upload bundle
uses: actions/upload-artifact@v4
with:
name: qgis-windows-qt6
path: |
build/*-win64.zip