Skip to content

Commit 447e996

Browse files
authored
Upend CI/CD one more time, add Windows MinGW and MSVC artifacts (#104)
* Test MinGW (and I'll be BAFFLED if this works first time) * Seriously? Didn't even get the NAME right, Seong? * Let's try using Windows Latest instead * oops * Oopsieees * Guh * llvm, maybeeeeee? * guuuuuh * pls don't make me repeat myself * Package up app all nice and neat for Wendies * forgot strip * Fix redundant path in calling for windeploy, oops * fasdfs * *more banging head against keyboard noises* * Wait, is that the real problem here? * Attempt to build for both MinGW and MSVC * Split workflows files * Fix win buildfile * Forgot to change the name too * Pedantry * Exclude MSVC-debug because can't be fucked rn * Fix output of appimage * One last pedantry
1 parent ea35883 commit 447e996

File tree

2 files changed

+99
-47
lines changed

2 files changed

+99
-47
lines changed
Lines changed: 21 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CMake - Windows & Linux
1+
name: CMake - Linux AppImages
22

33
on:
44
push:
@@ -13,53 +13,29 @@ jobs:
1313
fail-fast: false
1414

1515
matrix:
16-
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2019]
16+
os: [ubuntu-22.04, ubuntu-22.04-arm]
1717
qt_version: [5.15.2, 6.7.3, 6.8.3]
1818
build_type: [Debug, Release]
1919
include:
20-
- os: windows-2019
21-
c_compiler: cl
22-
cpp_compiler: cl
23-
file: build
24-
qt_arch: windows
25-
qt_version: 6.8.3
26-
qt6_modules: "qtserialport"
27-
pretty: "Windows Artifact"
2820
- os: ubuntu-22.04
29-
c_compiler: clang
30-
cpp_compiler: clang++
31-
file: OpenFIRE_App-x86_64.AppImage
32-
qt_arch: linux
21+
qt_host: linux
22+
qt_arch: gcc_64
3323
qt_version: 5.15.2
34-
qt6_modules: "qtserialport qtwaylandcompositor"
3524
sys_arch: x86_64
36-
install_prefix: -DCMAKE_INSTALL_PREFIX=/usr
3725
pretty: "Linux x86 AppImage"
3826
- os: ubuntu-22.04
39-
c_compiler: clang
40-
cpp_compiler: clang++
41-
file: OpenFIRE_App-x86_64.AppImage
42-
qt_arch: linux
27+
qt_host: linux
28+
qt_arch: linux_gcc_64
4329
qt_version: 6.8.3
44-
qt6_modules: "qtserialport qtwaylandcompositor"
4530
sys_arch: x86_64
46-
install_prefix: -DCMAKE_INSTALL_PREFIX=/usr
4731
pretty: "Linux x86 AppImage"
4832
- os: ubuntu-22.04-arm
49-
c_compiler: clang
50-
cpp_compiler: clang++
51-
file: OpenFIRE_App-aarch64.AppImage
52-
qt_arch: linux_arm64
33+
qt_host: linux_arm64
34+
qt_arch: linux_gcc_arm64
5335
qt_version: 6.7.3
54-
qt6_modules: "qtserialport qtwaylandcompositor"
5536
sys_arch: aarch64
56-
install_prefix: -DCMAKE_INSTALL_PREFIX=/usr
5737
pretty: "Linux ARM AppImage"
5838
exclude:
59-
- os: windows-2019
60-
qt_version: 5.15.2
61-
- os: windows-2019
62-
qt_version: 6.7.3
6339
- os: ubuntu-22.04
6440
qt_version: 6.7.3
6541
- os: ubuntu-22.04-arm
@@ -83,56 +59,54 @@ jobs:
8359
with:
8460
version: '${{ matrix.qt_version }}'
8561
archives: 'qtbase qtwayland qttranslations qttools qtsvg qtserialport icu'
62+
cache: true
8663
- name: Install Qt(6)
8764
if: ${{ matrix.qt_version != '5.15.2' }}
8865
uses: jdpurcell/install-qt-action@v5
8966
with:
9067
version: '${{ matrix.qt_version }}'
91-
host: '${{ matrix.qt_arch }}'
92-
modules: '${{ matrix.qt6_modules }}'
68+
host: '${{ matrix.qt_host }}'
69+
arch: '${{ matrix.qt_arch }}'
70+
modules: 'qtserialport qtwaylandcompositor'
9371
archives: 'qtbase qtwayland qttranslations qttools qtsvg icu'
72+
cache: true
9473

9574
- name: Configure CMake
9675
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
9776
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
9877
run: >
99-
cmake -B ${{ github.workspace }}/build
100-
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
101-
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
102-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
103-
-DOFAPP_GITHASH=${{steps.get-short-sha.outputs.id}}
104-
${{ matrix.install_prefix }}
105-
-S ${{ github.workspace }}
78+
cmake -B "${{ github.workspace }}/build"
79+
-DCMAKE_BUILD_TYPE="${{ matrix.build_type }}"
80+
-DOFAPP_GITHASH="${{steps.get-short-sha.outputs.id}}"
81+
-DCMAKE_INSTALL_PREFIX=/usr
82+
-S "${{ github.workspace }}"
10683
10784
- name: Build
10885
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
10986
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --parallel
11087

11188
- name: Install linuxdeploy
112-
if: ${{ matrix.os != 'windows-2019' }}
11389
uses: pcolby/install-linuxdeploy@v1
11490
with:
11591
plugins: qt appimage
11692

11793
- name: Setup AppImage
118-
if: ${{ matrix.os != 'windows-2019' }}
11994
env:
12095
EXTRA_PLATFORM_PLUGINS: libqwayland-generic.so
12196
EXTRA_QT_MODULES: waylandcompositor
12297
run: |
12398
make install DESTDIR=AppDir
12499
install -Dm755 "${{ github.workspace }}/img/ico/openfire.svg" "AppDir/usr/share/icons/hicolor/scalable/apps/org.TeamOpenFIRE.OpenFIREapp.svg"
125100
"${{ runner.temp }}/linuxdeploy/linuxdeploy-${{ matrix.sys_arch }}.AppImage" --plugin=qt --output appimage --appdir AppDir --desktop-file "${{ github.workspace }}/org.TeamOpenFIRE.OpenFIREapp.desktop"
126-
cp ${{ matrix.file }} ${{ github.workspace }}
101+
mv "OpenFIRE_App-${{matrix.sys_arch}}.AppImage" "${{ github.workspace }}"
127102
working-directory: ${{ github.workspace }}/build
128103

129104
- name: Upload Artifact
130105
uses: actions/upload-artifact@v4
131106
with:
132107
# Artifact name
133-
name: OpenFIREapp-${{ matrix.pretty }}-Qt${{ matrix.qt_version }}-${{ matrix.build_type }} # optional, default is artifact
134-
# A file, directory or wildcard pattern that describes what to upload
135-
path: ${{ matrix.file }}
108+
name: OpenFIREapp-${{ matrix.pretty }}-Qt${{ matrix.qt_version }}-${{ matrix.build_type }}
109+
path: "OpenFIRE_App-${{matrix.sys_arch}}.AppImage"
136110

137111
- name: Download a Build Artifact
138112
uses: actions/download-artifact@v4
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CMake - Windows 10+ Packages
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
11+
strategy:
12+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
13+
fail-fast: false
14+
15+
matrix:
16+
build_type: [Debug, Release]
17+
win_arch: [win64_msvc2022_64, win64_mingw]
18+
include:
19+
- win_arch: win64_mingw
20+
qt_tools: tools_mingw1310
21+
cmake_gen: "MinGW Makefiles"
22+
pretty: "Windows Artifact (MinGW)"
23+
- win_arch: win64_msvc2022_64
24+
cmake_gen: "Visual Studio 17 2022"
25+
pretty: "Windows Artifact (MSVC)"
26+
# MSVC insists on being weird with its Debug path, and can't be assed to fix it
27+
exclude:
28+
- win_arch: win64_msvc2022_64
29+
build_type: Debug
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
submodules: 'true'
35+
36+
- name: Get short SHA
37+
id: get-short-sha
38+
run: echo "id=$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
39+
40+
# TODO: using install-qt-action fork until https://github.com/jurplel/install-qt-action/issues/248 is resolved & merged
41+
- name: Install Qt6
42+
uses: jdpurcell/install-qt-action@v5
43+
with:
44+
version: '6.8.3'
45+
arch: '${{ matrix.win_arch }}'
46+
modules: 'qtserialport'
47+
tools: '${{ matrix.qt_tools }}'
48+
archives: 'qtbase qttranslations qttools qtsvg icu'
49+
cache: true
50+
51+
- name: Configure CMake
52+
run: >
53+
cmake -B "${{ github.workspace }}/build"
54+
-DCMAKE_BUILD_TYPE="${{ matrix.build_type }}"
55+
-DOFAPP_GITHASH="${{steps.get-short-sha.outputs.id}}"
56+
-G "${{ matrix.cmake_gen }}"
57+
-S "${{ github.workspace }}"
58+
59+
- name: Build
60+
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
61+
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --parallel
62+
63+
- name: Deploy Windows App & Libraries
64+
run: |
65+
cmake --install "${{ github.workspace }}/build" --prefix "${{ github.workspace }}/build/out" --strip
66+
windeployqt "${{ github.workspace }}/build/out/bin/OpenFIREapp.exe" --no-translations --no-system-d3d-compiler --no-opengl-sw --no-network --exclude-plugins qnetworklistmanager,qtuiotouchplugin,qsvgicon,qcertonlybackend,qchannelbackend
67+
mv "${{ github.workspace }}/build/out/bin" "${{ github.workspace }}/build/out/OpenFIRE App"
68+
69+
- name: Upload Artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
# Artifact name
73+
name: OpenFIREapp-${{ matrix.pretty }}-Qt6-${{ matrix.build_type }} # optional, default is artifact
74+
# A file, directory or wildcard pattern that describes what to upload
75+
path: build/out
76+
77+
- name: Download a Build Artifact
78+
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)