From 30a62fd14f3885cad9deefa67743454c7d64900b Mon Sep 17 00:00:00 2001 From: ZephZae <116720216+thezephyrsong@users.noreply.github.com> Date: Wed, 17 Jun 2026 11:26:39 +1000 Subject: [PATCH] Add caching for Qt installation in release workflow --- .github/workflows/release.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bfb0a1c..402e8e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,18 +21,27 @@ jobs: 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 via aqtinstall + 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 via vcpkg run: | vcpkg install libgit2:x64-windows - echo "LIBGIT2_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" >> $GITHUB_ENV - echo "LIBGIT2_LIBRARY=C:/vcpkg/installed/x64-windows/lib/git2.lib" >> $GITHUB_ENV - name: Configure CMake run: | @@ -40,8 +49,9 @@ jobs: cmake -B build -S . ` -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_PREFIX_PATH="${{ github.workspace }}/Qt/6.8.3/msvc2022_64" ` - -DLIBGIT2_INCLUDE_DIR="${{ env.LIBGIT2_INCLUDE_DIR }}" ` - -DLIBGIT2_LIBRARY="${{ env.LIBGIT2_LIBRARY }}" + -DLIBGIT2_INCLUDE_DIR="C:/vcpkg/installed/x64-windows/include" ` + -DLIBGIT2_LIBRARY="C:/vcpkg/installed/x64-windows/lib/git2.lib" ` + -DCPACK_PACKAGE_VERSION="$version" - name: Build Project run: | @@ -51,7 +61,14 @@ jobs: working-directory: build run: | cpack -C Release - + + - name: Upload build artifacts on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: build-logs + path: build/ + - name: Create GitHub Release and Upload Artifacts uses: softprops/action-gh-release@v2 with: