From 1f1581d3eab2773ed9941b8e3b3a9dda95b56982 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Sat, 12 Sep 2026 15:29:00 +0200 Subject: [PATCH] Add Windows test build workflow --- .github/workflows/build-test.yml | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..c0719ae --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,68 @@ +name: Windows Test Build + +on: + push: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Cache Qt + id: cache-qt + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/Qt + key: qt-6.8.3-msvc2022_64 + + - name: Install Qt + if: steps.cache-qt.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + pip install aqtinstall + python -m aqt install-qt windows desktop 6.8.3 win64_msvc2022_64 --outputdir ${{ github.workspace }}/Qt + + - name: Add Qt to PATH + run: echo "${{ github.workspace }}/Qt/6.8.3/msvc2022_64/bin" >> $GITHUB_PATH + + - name: Install libgit2 + run: vcpkg install libgit2:x64-windows + + - name: Configure CMake + run: | + cmake -B build -S . ` + -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/Qt/6.8.3/msvc2022_64" ` + -DLIBGIT2_INCLUDE_DIR="C:/vcpkg/installed/x64-windows/include" ` + -DLIBGIT2_LIBRARY="C:/vcpkg/installed/x64-windows/lib/git2.lib" ` + -DCPACK_PACKAGE_VERSION="test" + + - name: Build + run: cmake --build build --config Release + + - name: Install NSIS + run: choco install nsis -y + + - name: Package + working-directory: build + run: cpack -C Release + + - name: Upload test installer + uses: actions/upload-artifact@v4 + with: + name: GitAddonsManager-OctoWoW-test + path: build/GitAddonsManager-*.exe + if-no-files-found: error