-
Notifications
You must be signed in to change notification settings - Fork 17
182 lines (163 loc) · 6.22 KB
/
ci.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: CI
on: [push, pull_request]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt-get install -y libkf5syntaxhighlighting-dev ninja-build qtbase5-dev
- name: Checkout string_theory
uses: actions/checkout@v4
with:
repository: zrax/string_theory
path: string_theory
- name: Build string_theory
run: |
mkdir -p string_theory/build && cd string_theory/build
cmake -GNinja -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/build_deps/prefix" \
-DCMAKE_BUILD_TYPE=Release -DST_BUILD_TESTS=OFF ..
cmake --build .
cmake --build . --target install
- name: Checkout HSPlasma
uses: actions/checkout@v4
with:
repository: H-uru/libhsplasma
path: libhsplasma
- name: Build HSPlasma
run: |
mkdir -p libhsplasma/build && cd libhsplasma/build
cmake -GNinja -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/build_deps/prefix" \
-DENABLE_PYTHON=OFF -DENABLE_TOOLS=OFF -DENABLE_NET=OFF -DENABLE_PHYSX=OFF ..
cmake --build .
cmake --build . --target install
- name: Build PlasmaShop
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/build_deps/prefix" ..
cmake --build .
build-windows:
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: ""
qt: 5.15.2
qt_arch: win64_msvc2019_64
- 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@v4
with:
submodules: true
- name: Bootstrap vcpkg
id: bootstrap-vcpkg
run: |
cd C:/vcpkg
git pull
Write-Output "vcpkg-rev=$(git rev-parse HEAD)" >> $Env:GITHUB_OUTPUT
./bootstrap-vcpkg.bat
- name: Restore Dependency Cache
id: cache-vcpkg
uses: actions/cache@v4
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: 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: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: ${{ matrix.cfg.qt-arch }}
version: ${{ matrix.cfg.qt }}
dir: ${{ github.workspace }}\qt
cache: true
# KF5SyntaxHighlighting and ecm release in lock-step
- name: Checkout ECM
uses: actions/checkout@v4
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@v4
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@v4
with:
name: ${{ runner.os }}-${{ matrix.cfg.cmake-arch }}-qt${{ matrix.cfg.qt }}
path: install\bin