99
1010jobs :
1111 build :
12- name : Build on ${{ matrix.os }}
12+ name : Build on ${{ matrix.os }} (${{ matrix.compiler }})
1313 runs-on : ${{ matrix.os }}
1414 strategy :
1515 fail-fast : false
1616 matrix :
17- os : [ubuntu-latest, windows-latest, macos-latest]
17+ include :
18+ - os : ubuntu-latest
19+ compiler : gcc
20+ - os : windows-latest
21+ compiler : msvc
22+ - os : windows-latest
23+ compiler : mingw
24+ - os : macos-latest
25+ compiler : clang
1826
1927 steps :
2028 - name : Checkout Code
@@ -26,28 +34,77 @@ jobs:
2634 sudo apt-get update
2735 sudo apt-get install -y libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils libx11-xcb-dev libxcb-glx0-dev
2836
37+ # MinGW: install everything (compiler + Qt) through MSYS2 for consistency
38+ - name : Install MSYS2 MinGW toolchain and Qt
39+ if : matrix.compiler == 'mingw'
40+ uses : msys2/setup-msys2@v2
41+ with :
42+ msystem : MINGW64
43+ update : true
44+ install : >-
45+ mingw-w64-x86_64-gcc
46+ mingw-w64-x86_64-cmake
47+ mingw-w64-x86_64-ninja
48+ mingw-w64-x86_64-qt6-base
49+ mingw-w64-x86_64-qt6-declarative
50+ mingw-w64-x86_64-qt6-multimedia
51+ mingw-w64-x86_64-qt6-tools
52+
53+ # Non-MinGW platforms: install Qt via install-qt-action
2954 - name : Install Qt
55+ if : matrix.compiler != 'mingw'
3056 uses : jurplel/install-qt-action@v4
3157 with :
3258 version : ' 6.10.0'
3359 modules : ' qtmultimedia'
3460
35- - name : Configure CMake
61+ # --- Configure ---
62+ - name : Configure CMake (MinGW)
63+ if : matrix.compiler == 'mingw'
64+ shell : msys2 {0}
65+ run : cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install_dir
66+
67+ - name : Configure CMake (MSVC)
68+ if : matrix.compiler == 'msvc'
69+ run : cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install_dir
70+
71+ - name : Configure CMake (Unix)
72+ if : runner.os != 'Windows'
3673 run : cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install_dir
3774
38- - name : Build and Install
75+ # --- Build & Install ---
76+ - name : Build and Install (MinGW)
77+ if : matrix.compiler == 'mingw'
78+ shell : msys2 {0}
79+ run : cmake --build build --target install -j 4
80+
81+ - name : Build and Install (MSVC)
82+ if : matrix.compiler == 'msvc'
83+ run : cmake --build build --config Release --target install -j 4
84+
85+ - name : Build and Install (Unix)
86+ if : runner.os != 'Windows'
3987 run : cmake --build build --config Release --target install -j 4
4088
41- - name : Deploy Qt (Windows)
42- if : runner.os == 'Windows'
89+ # --- Deploy ---
90+ - name : Deploy Qt (Windows MSVC)
91+ if : matrix.compiler == 'msvc'
4392 shell : cmd
4493 run : |
4594 windeployqt --release install_dir\bin\adskiller.exe
4695
96+ - name : Deploy Qt (Windows MinGW)
97+ if : matrix.compiler == 'mingw'
98+ shell : msys2 {0}
99+ run : |
100+ windeployqt --release --compiler-runtime install_dir/bin/adskiller.exe
101+ # windeployqt in MSYS2 misses transitive 3rd-party dependencies (icu, zstd, pcre2, etc.)
102+ # Use ldd to find all required mingw64 DLLs and copy them to the bin folder
103+ ldd install_dir/bin/adskiller.exe | grep -i '\/mingw64\/bin\/.*\.dll' | awk '{print $3}' | xargs -I '{}' cp -v '{}' install_dir/bin/
104+
47105 - name : Deploy Qt (Linux)
48106 if : runner.os == 'Linux'
49107 run : |
50- # Copy multimedia plugins manually
51108 QT_PLUGIN_PATH="${Qt6_DIR}/../../../plugins"
52109 if [ -d "$QT_PLUGIN_PATH/multimedia" ]; then
53110 mkdir -p install_dir/lib/plugins/multimedia
57114 - name : Deploy Qt (macOS)
58115 if : runner.os == 'macOS'
59116 run : |
60- # Run macdeployqt on the shared library location
61117 QT_PLUGIN_PATH="${Qt6_DIR}/../../../plugins"
62118 APP_BUNDLE=$(find install_dir -name "*.app" -maxdepth 1 | head -1)
63119 if [ -n "$APP_BUNDLE" ] && [ -d "$QT_PLUGIN_PATH/multimedia" ]; then
68124 - name : Upload Artifact
69125 uses : actions/upload-artifact@v4
70126 with :
71- name : pixelblast -${{ runner.os }}
127+ name : adskiller -${{ runner.os }}-${{ matrix.compiler }}
72128 path : install_dir/
0 commit comments