Skip to content

Commit 24d61c4

Browse files
author
Nikolaj Schlej
committed
Enable UI dark mode detection for Linux and FreeBSD, switch to Qt6 for them too
1 parent 1c73007 commit 24d61c4

File tree

2 files changed

+140
-137
lines changed

2 files changed

+140
-137
lines changed

.github/workflows/main.yml

Lines changed: 132 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ on:
88
types: [published]
99

1010
jobs:
11-
build_mac:
12-
name: Build on macOS 12 (universal, static Qt 6.4.2)
11+
# Release builds
12+
build_release_macos:
13+
name: Release build (macOS universal, static Qt 6.4.2)
1314
runs-on: macos-12
14-
env:
15-
HAS_QT: 1
1615
steps:
1716
- uses: actions/checkout@v3
1817
- name: Get Qt
@@ -41,9 +40,9 @@ jobs:
4140
shell: bash
4241
run: |
4342
UEFITOOL_VER=$(cat ../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
44-
zip -qry ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_universal_mac.zip UEFIExtract/UEFIExtract
45-
zip -qry ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_universal_mac.zip UEFIFind/UEFIFind
46-
zip -qry ../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_universal_mac.zip UEFITool/UEFITool.app
43+
zip -qryj ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_universal_mac.zip ./UEFIExtract/UEFIExtract
44+
zip -qryj ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_universal_mac.zip ./UEFIFind/UEFIFind
45+
zip -qryj ../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_universal_mac.zip ./UEFITool/UEFITool.app
4746
- name: Upload to artifacts
4847
uses: actions/upload-artifact@v3
4948
with:
@@ -58,17 +57,34 @@ jobs:
5857
tag: ${{ github.ref }}
5958
file_glob: true
6059

61-
build_linux:
62-
name: Build on Ubuntu 20.04 LTS (Qt 5)
63-
runs-on: ubuntu-20.04
64-
env:
65-
HAS_QT: 1
60+
build_release_linux:
61+
name: Release build (Linux x64, shared Qt 6.x)
62+
runs-on: ubuntu-22.04
6663
steps:
6764
- uses: actions/checkout@v3
6865
- name: Get Qt
69-
run: sudo apt-get install -qq qt5-default qt5-qmake qtbase5-dev-tools cmake
66+
run: |
67+
sudo apt update
68+
sudo apt-get install -qq zip cmake libgl1-mesa-dev qt6-base-dev
69+
- name: Create build directory
70+
run: cmake -E make_directory ${{runner.workspace}}/build
71+
- name: Configure everything
72+
working-directory: ${{runner.workspace}}/build
73+
run: cmake ../UEFITool
7074
- name: Build everything
71-
run: ./unixbuild.sh
75+
working-directory: ${{runner.workspace}}/build
76+
shell: bash
77+
run: cmake --build . --config Release
78+
- name: Create dist directory
79+
run: cmake -E make_directory ${{runner.workspace}}/UEFITool/dist
80+
- name: Archive everything
81+
working-directory: ${{runner.workspace}}/build
82+
shell: bash
83+
run: |
84+
UEFITOOL_VER=$(cat ../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
85+
zip -qryj ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_x64_linux.zip ./UEFIExtract/uefiextract
86+
zip -qryj ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_x64_linux.zip ./UEFIFind/uefifind
87+
zip -qryj ../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_x64_linux.zip ./UEFITool/uefitool
7288
- name: Upload to artifacts
7389
uses: actions/upload-artifact@v3
7490
with:
@@ -83,60 +99,28 @@ jobs:
8399
tag: ${{ github.ref }}
84100
file_glob: true
85101

86-
build_linux_sanitizers:
87-
name: Build on Ubuntu Latest with Clang sanitizers (Qt 6)
88-
runs-on: ubuntu-latest
89-
env:
90-
HAS_QT: 1
91-
steps:
92-
- uses: actions/checkout@v3
93-
- name: Get Qt
94-
run: |
95-
sudo apt update
96-
sudo apt-get install -qq cmake libgl1-mesa-dev libglx-dev qmake6 libqt6opengl6-dev qt6-base-dev
97-
- name: Make a debug build of UEFITool with Clang sanitizers enabled
98-
run: |
99-
mkdir build
100-
cd build
101-
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Debug ../UEFITool
102-
make
103-
- name: Upload to artifacts
104-
uses: actions/upload-artifact@v3
105-
with:
106-
name: Linux builds with Clang sanitizers enabled
107-
path: build/UEFITool
108-
109-
build_linux_meson:
110-
name: Build on Ubuntu Latest with Meson (Qt 5)
111-
runs-on: ubuntu-latest
112-
steps:
113-
- uses: actions/checkout@v3
114-
- name: Get Deps
115-
run: |
116-
sudo apt update
117-
sudo apt-get install -qq zlib1g-dev meson qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
118-
- name: Configure build
119-
run: mkdir build-meson && meson ./build-meson
120-
- name: Build everything
121-
run: ninja -C build-meson
122-
123-
build_freebsd:
124-
name: Build on FreeBSD (Qt 5)
102+
build_release_freebsd:
103+
name: Release build (FreeBSD x64, shared Qt 6.x)
125104
runs-on: macos-12
126-
env:
127-
HAS_QT: 1
128105
steps:
129106
- uses: actions/checkout@v3
130107
- name: Build on FreeBSD inside macOS VM
131108
id: test
132109
uses: vmactions/freebsd-vm@v0
133110
with:
134111
usesh: true
135-
envs: "HAS_QT"
136112
prepare: |
137-
pkg install -y bash zip cmake qt5-qmake qt5-buildtools qt5-core qt5-gui qt5-widgets
113+
pkg install -y zip cmake qt6-base
138114
run: |
139-
bash unixbuild.sh
115+
mkdir dist
116+
mkdir build
117+
cd build
118+
cmake ..
119+
cmake --build . --config Release
120+
UEFITOOL_VER=$(cat ../version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
121+
zip -qryj ../dist/UEFIExtract_NE_${UEFITOOL_VER}_x64_freebsd.zip ./UEFIExtract/uefiextract
122+
zip -qryj ../dist/UEFIFind_NE_${UEFITOOL_VER}_x64_freebsd.zip ./UEFIFind/uefifind
123+
zip -qryj ../dist/UEFITool_NE_${UEFITOOL_VER}_x64_freebsd.zip ./UEFITool/uefitool
140124
- name: Upload to artifacts
141125
uses: actions/upload-artifact@v3
142126
with:
@@ -151,53 +135,8 @@ jobs:
151135
tag: ${{ github.ref }}
152136
file_glob: true
153137

154-
build_windows_64:
155-
name: Build on Windows 2022 (64-bit, static Qt 6.4.2)
156-
runs-on: windows-2022
157-
steps:
158-
- uses: actions/checkout@v3
159-
- name: Get Qt 6.4.2
160-
uses: actions/checkout@v3
161-
with:
162-
repository: LongSoft/qt-6.4.2-static-x64-msvc2022
163-
path: qt6
164-
lfs: true
165-
- name: Unpack Qt 6.4.2
166-
shell: bash
167-
working-directory: qt6
168-
run: 7z x qt-6.4.2-static-x64-msvc2022.7z -o../..
169-
- name: Create UEFITool win64 build directory
170-
run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool_win64
171-
- name: Configure UEFITool win64
172-
working-directory: ${{runner.workspace}}/build/UEFITool_win64
173-
shell: cmd
174-
run: cmake -DCMAKE_PREFIX_PATH="D:\a\UEFITool\qt-6.4.2-static-x64-msvc2022" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ..\..\UEFITool\UEFITool
175-
- name: Build UEFITool win64
176-
working-directory: ${{runner.workspace}}/build/UEFITool_win64
177-
shell: bash
178-
run: cmake --build . --config Release
179-
- name: Archive UEFITool win64
180-
working-directory: ${{runner.workspace}}/build/UEFITool_win64/Release
181-
shell: bash
182-
run: |
183-
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
184-
7z a ../../../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_win64.zip UEFITool.exe
185-
- name: Upload to artifacts
186-
uses: actions/upload-artifact@v3
187-
with:
188-
name: Windows 64-bit builds
189-
path: dist/*.zip
190-
- name: Upload to releases
191-
if: github.event_name == 'release'
192-
uses: svenstaro/upload-release-action@v2
193-
with:
194-
repo_token: ${{ secrets.GITHUB_TOKEN }}
195-
file: dist/*.zip
196-
tag: ${{ github.ref }}
197-
file_glob: true
198-
199-
build_windows_32:
200-
name: Build on Windows 2019 (32-bit, static Qt 5.6.3)
138+
build_release_windows_32:
139+
name: Release build (Win32, static Qt 5.6.3)
201140
runs-on: windows-2019
202141
steps:
203142
- uses: actions/checkout@v3
@@ -278,8 +217,72 @@ jobs:
278217
tag: ${{ github.ref }}
279218
file_glob: true
280219

281-
build_windows_mingw:
282-
name: Build on Windows Latest with MinGW (Qt 6.4.2)
220+
build_release_windows_64:
221+
name: Release build (Win64, static Qt 6.4.2)
222+
runs-on: windows-2022
223+
steps:
224+
- uses: actions/checkout@v3
225+
- name: Get Qt 6.4.2
226+
uses: actions/checkout@v3
227+
with:
228+
repository: LongSoft/qt-6.4.2-static-x64-msvc2022
229+
path: qt6
230+
lfs: true
231+
- name: Unpack Qt 6.4.2
232+
shell: bash
233+
working-directory: qt6
234+
run: 7z x qt-6.4.2-static-x64-msvc2022.7z -o../..
235+
- name: Create build directory
236+
run: cmake -E make_directory ${{runner.workspace}}/build
237+
- name: Configure everything
238+
working-directory: ${{runner.workspace}}/build
239+
shell: cmd
240+
run: cmake -DCMAKE_PREFIX_PATH="D:\a\UEFITool\qt-6.4.2-static-x64-msvc2022" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ../UEFITool
241+
- name: Build everything
242+
working-directory: ${{runner.workspace}}/build
243+
shell: bash
244+
run: cmake --build . --config Release
245+
- name: Create dist directory
246+
run: cmake -E make_directory ${{runner.workspace}}/UEFITool/dist
247+
- name: Archive everything
248+
working-directory: ${{runner.workspace}}/build
249+
shell: bash
250+
run: |
251+
UEFITOOL_VER=$(cat ../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
252+
7z a ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_win64.zip ./UEFIExtract/Release/UEFIExtract.exe
253+
7z a ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_win64.zip ./UEFIFind/Release/UEFIFind.exe
254+
7z a ../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_win64.zip ./UEFITool/Release/UEFITool.exe
255+
- name: Upload to artifacts
256+
uses: actions/upload-artifact@v3
257+
with:
258+
name: Windows 64-bit builds
259+
path: dist/*.zip
260+
- name: Upload to releases
261+
if: github.event_name == 'release'
262+
uses: svenstaro/upload-release-action@v2
263+
with:
264+
repo_token: ${{ secrets.GITHUB_TOKEN }}
265+
file: dist/*.zip
266+
tag: ${{ github.ref }}
267+
file_glob: true
268+
269+
# Build Tests
270+
build_test_linux_meson:
271+
name: Meson build system test
272+
runs-on: ubuntu-latest
273+
steps:
274+
- uses: actions/checkout@v3
275+
- name: Get Deps
276+
run: |
277+
sudo apt update
278+
sudo apt-get install -qq cmake meson zlib1g-dev qtbase5-dev
279+
- name: Configure build
280+
run: mkdir build-meson && meson ./build-meson
281+
- name: Build everything
282+
run: ninja -C build-meson
283+
284+
build_test_windows_mingw:
285+
name: MinGW compiler test
283286
runs-on: windows-latest
284287
steps:
285288
- uses: actions/checkout@v3
@@ -290,52 +293,53 @@ jobs:
290293
host: 'windows'
291294
target: 'desktop'
292295
arch: 'win64_mingw'
293-
- name: Build everything using CMake and MinGW
296+
- name: Build everything
294297
run: |
295298
cmake -G "MinGW Makefiles" -B build .
296299
cmake --build build -j
297-
298-
analyze_coverity:
300+
301+
# Static Analysis
302+
build_analyze_linux_coverity:
299303
env:
300304
PROJECT_TYPE: TOOL
301305
JOB_TYPE: COVERITY
302-
HAS_QT: 1
303306
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
304-
name: Coverity Static Analysis on Ubuntu Latest (Qt 6.4.2)
307+
name: Coverity Static Analysis
305308
runs-on: ubuntu-latest
306309
steps:
310+
- uses: actions/checkout@v3
307311
- name: Install Qt
308312
uses: jurplel/install-qt-action@v3
309313
with:
310314
version: '6.4.2'
311315
host: 'linux'
312316
target: 'desktop'
313-
- name: CI Bootstrap
314-
run: |
315-
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
316-
- uses: actions/checkout@v3
317-
- run: ./unixbuild.sh --configure
317+
- name: Create build directory
318+
run: cmake -E make_directory ${{runner.workspace}}/build
319+
- name: Configure everything
320+
working-directory: ${{runner.workspace}}/build
321+
run: cmake ../UEFITool
318322
- name: Run Coverity
323+
working-directory: ${{runner.workspace}}/build
319324
run: |
320325
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/coverity/covstrap-linux.sh) && eval "$src" || exit 1
321326
env:
322327
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
323328
COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
324-
COVERITY_BUILD_COMMAND: ./unixbuild.sh --build
329+
COVERITY_BUILD_COMMAND: cmake --build .
325330

326-
analyze_pvs_studio_and_codeql:
331+
build_analyze_linux_pvs_studio_and_codeql:
327332
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
328-
name: PVS-Studio and CodeQL Static Analysis on Ubuntu Latest (Qt 6.4.2)
333+
name: PVS-Studio and CodeQL Static Analysis
329334
runs-on: ubuntu-latest
330335
steps:
336+
- uses: actions/checkout@v3
331337
- name: Install Qt
332338
uses: jurplel/install-qt-action@v3
333339
with:
334340
version: '6.4.2'
335341
host: 'linux'
336342
target: 'desktop'
337-
- name: Check out
338-
uses: actions/checkout@v3
339343
- name: Install PVS-Studio
340344
run: |
341345
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt \
@@ -349,7 +353,7 @@ jobs:
349353
uses: github/codeql-action/init@v2
350354
with:
351355
languages: cpp
352-
- name: Build everything using CMake
356+
- name: Build everything
353357
run: |
354358
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On -B build .
355359
cmake --build build -j
@@ -367,24 +371,24 @@ jobs:
367371
sarif_file: pvs-report.sarif
368372
category: PVS-Studio
369373

370-
analyze_sonarcloud:
374+
build_analyze_linux_sonarcloud:
371375
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
372-
name: SonarCloud Static Analysis on Ubuntu Latest (Qt 6.4.2)
376+
name: SonarCloud Static Analysis
373377
runs-on: ubuntu-latest
374378
env:
375379
SONAR_SCANNER_VERSION: 4.7.0.2747
376380
SONAR_SERVER_URL: "https://sonarcloud.io"
377381
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
378382
steps:
383+
- uses: actions/checkout@v3
384+
with:
385+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
379386
- name: Install Qt
380387
uses: jurplel/install-qt-action@v3
381388
with:
382389
version: '6.4.2'
383390
host: 'linux'
384391
target: 'desktop'
385-
- uses: actions/checkout@v3
386-
with:
387-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
388392
- name: Set up JDK 11
389393
uses: actions/setup-java@v3
390394
with:

0 commit comments

Comments
 (0)