-
Notifications
You must be signed in to change notification settings - Fork 17
142 lines (127 loc) · 4.97 KB
/
windows-ci.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Windows-CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.cfg.os }}
strategy:
matrix:
cfg:
- os: windows-2019
generator: Visual Studio 16 2019
cmake-arch: Win32
triplet: x86-windows-static-md
kf5: v5.106.0
qt: 5.15.2
kf5_cmake_args: ""
qt-arch: win32_msvc2019
- os: windows-2019
generator: Visual Studio 16 2019
cmake-arch: x64
triplet: x64-windows-static-md
kf5: v5.106.0
kf5_cmake_args: "-DBUILD_WITH_QT6=ON"
qt: 6.5.1
qt_arch: win64_msvc2019_64
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Bootstrap vcpkg
id: bootstrap-vcpkg
run: |
cd C:\vcpkg
git pull
Write-Host "::set-output name=vcpkg-rev::$(git rev-parse HEAD)"
./bootstrap-vcpkg.bat
- name: Restore Dependency Cache
id: cache-vcpkg
uses: actions/cache@v3
with:
path: ${{ github.workspace }}\vcpkg_installed
key: |
vcpkg-triplet=${{ matrix.cfg.triplet }} vcpkg-response=${{ hashFiles('vcpkg.json') }} vcpkg-rev=${{ steps.bootstrap-vcpkg.outputs.vcpkg-rev }}
restore-keys: |
vcpkg-triplet=${{ matrix.cfg.triplet }} vcpkg-response=${{ hashFiles('vcpkg.json') }}
vcpkg-triplet=${{ matrix.cfg.triplet }}
- name: Upgrade Dependencies
if: steps.cache-vcpkg.outputs.cache-hit == 'true'
run: |
vcpkg upgrade --no-dry-run --triplet ${{ matrix.cfg.triplet }}
- name: Build Dependencies
run: |
vcpkg install --triplet ${{ matrix.cfg.triplet }}
vcpkg list --x-full-desc
# Qt5 takes roughly a thousand years to build, so we download it from elsewhere...
- name: Restore Qt Cache
id: cache-qt
uses: actions/cache@v3
with:
path: ${{ github.workspace }}\qt
key: os=${{ runner.os }} qt=${{ matrix.cfg.qt }} arch=${{ matrix.cfg.qt-arch }}
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: ${{ matrix.cfg.qt-arch }}
version: ${{ matrix.cfg.qt }}
dir: ${{ github.workspace }}\qt
cached: ${{ steps.cache-qt.outputs.cache-hit }}
# KF5SyntaxHighlighting and ecm release in lock-step
- name: Checkout ECM
uses: actions/checkout@v3
with:
repository: KDE/extra-cmake-modules
path: ecm
ref: ${{ matrix.cfg.kf5 }}
- name: Build ECM
run: |
cd ecm
mkdir build && cd build
cmake `
-G "${{ matrix.cfg.generator }}" -A ${{ matrix.cfg.cmake-arch }} `
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
-DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF `
${{ matrix.cfg.kf5_cmake_args }} ..
cmake --build . --config Release -j 2
cmake --build . --config Release --target INSTALL
# Build KF5SyntaxHighlighting manually due to Qt dependency...
- name: Checkout KF5SyntaxHighlighting
uses: actions/checkout@v3
with:
repository: KDE/syntax-highlighting
path: syntax-highlighting
ref: ${{ matrix.cfg.kf5 }}
- uses: shogo82148/actions-setup-perl@v1
- name: Build KF5SyntaxHighlighting
run: |
cd syntax-highlighting
mkdir build && cd build
cmake `
-G "${{ matrix.cfg.generator }}" -A ${{ matrix.cfg.cmake-arch }} `
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
-DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF `
${{ matrix.cfg.kf5_cmake_args }} ..
cmake --build . --config Release -j 2
cmake --build . --config Release --target INSTALL
- name: Build PlasmaShop
run: |
mkdir build && cd build
cmake `
-G "${{ matrix.cfg.generator }}" -A ${{ matrix.cfg.cmake-arch }} `
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake `
-DVCPKG_TARGET_TRIPLET=${{ matrix.cfg.triplet }} `
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
..
cmake --build . --config Release -j 2
cmake --build . --config Release --target INSTALL
- name: Deploy Qt
run: |
$ExeFiles = Get-ChildItem "${{ github.workspace }}\install\bin" -Filter *.exe
$DllFiles = Get-ChildItem "${{ github.workspace }}\install\bin" -Filter *.dll
ForEach-Object -InputObject ($ExeFiles + $DllFiles) {
windeployqt.exe --release $_.FullName
}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-${{ matrix.cfg.cmake-arch }}-qt${{ matrix.cfg.qt }}
path: install\bin