From 1b96a48266e9a7b2c8824b205a4b749c417d76a7 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 24 Nov 2025 02:51:46 +0800 Subject: [PATCH] GHA CI: test built binary This would ensure the built binary is able to start up and rule out compiler or library linking issues. PR #23529. --- .github/workflows/ci_macos.yaml | 5 +++++ .github/workflows/ci_ubuntu.yaml | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 9a6fe7c54..0172dffac 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -119,6 +119,11 @@ jobs: cmake --build build --target qbt_update_translations cmake --build build cmake --build build --target check + if [ "${{ matrix.qbt_gui }}" = "GUI=ON" ]; then + build/qbittorrent.app/Contents/MacOS/qbittorrent -v + else + build/qbittorrent-nox.app/Contents/MacOS/qbittorrent-nox -v + fi - name: Prepare build artifacts run: | diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index 2c5b35fe2..ad9868564 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -39,7 +39,7 @@ jobs: sudo apt update sudo apt install \ build-essential cmake ninja-build \ - libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev + libssl-dev zlib1g-dev - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 @@ -123,6 +123,11 @@ jobs: cmake --build build --target qbt_update_translations cmake --build build cmake --build build --target check + if [ "${{ matrix.qbt_gui }}" = "GUI=ON" ]; then + QT_QPA_PLATFORM=offscreen build/qbittorrent -v + else + build/qbittorrent-nox -v + fi DESTDIR="qbittorrent" cmake --install build - name: Run CodeQL analysis