From 808fb75a2ac2ff9393539cb786e1e25d94d69ece Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 19 Oct 2023 15:42:11 +0200 Subject: [PATCH] workflows bugfix missing vcpkg remove - also upgrade vcpkg to latest version --- .github/workflows/vcpkg-linux.yml | 24 +++++++++++++++++++++--- .github/workflows/vcpkg-windows.yml | 24 +++++++++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/vcpkg-linux.yml b/.github/workflows/vcpkg-linux.yml index 269c308f8..4fed3bebd 100644 --- a/.github/workflows/vcpkg-linux.yml +++ b/.github/workflows/vcpkg-linux.yml @@ -137,9 +137,27 @@ jobs: run: | sqlite3 --version - # The following two steps are not needed below they only test if the vcpkg classic mode works - # correctly. The Release and Debug build types are build at once so invoke these two steps - # for the debug matrix only. + # The following two steps (vcpkg install) are not needed below they only test if the vcpkg + # classic mode works correctly. The Release and Debug build types are build at once so invoke + # these two steps for the debug matrix only. + + - name: vcpkg upgrade repository (latest version) + if: env.TinyIsSelfHostedRunner == 'true' && matrix.build-type.key == 'debug' + run: | + cd "$VCPKG_INSTALLATION_ROOT" + + git switch master + git fetch --tags origin + git reset --hard origin/master + + # This should reliably remove the qtbase and tinyorm with all dependencies. + # It's much faster to do it this way like removing the whole vcpkg folder and then the binary + # caching should kick in. + - name: vcpkg remove ${{ matrix.qt.vcpkg-qt }} and ${{ matrix.qt.vcpkg-tinyorm }} (classic mode) + if: matrix.build-type.key == 'debug' + run: >- + vcpkg remove --recurse vcpkg-cmake vcpkg-cmake-config zlib ${{ matrix.qt.vcpkg-qt }} + ${{ matrix.qt.vcpkg-tinyorm }} - name: vcpkg install ${{ matrix.qt.vcpkg-qt }} (classic mode) if: matrix.build-type.key == 'debug' diff --git a/.github/workflows/vcpkg-windows.yml b/.github/workflows/vcpkg-windows.yml index 6635c73c0..e2e160048 100644 --- a/.github/workflows/vcpkg-windows.yml +++ b/.github/workflows/vcpkg-windows.yml @@ -121,9 +121,27 @@ jobs: run: | cmake.exe --version - # The following two steps are not needed below they only test if the vcpkg classic mode works - # correctly. The Release and Debug build types are build at once so invoke these two steps - # for the debug matrix only. + # The following two steps (vcpkg install) are not needed below they only test if the vcpkg + # classic mode works correctly. The Release and Debug build types are build at once so invoke + # these two steps for the debug matrix only. + + - name: vcpkg upgrade repository (latest version) + if: env.TinyIsSelfHostedRunner == 'true' && matrix.build-type.key == 'debug' + run: | + Set-Location -Path $env:VCPKG_INSTALLATION_ROOT + + git.exe switch master + git.exe fetch --tags origin + git.exe reset --hard origin/master + + # This should reliably remove the qtbase and tinyorm with all dependencies. + # It's much faster to do it this way like removing the whole vcpkg folder and then the binary + # caching should kick in. + - name: vcpkg remove ${{ matrix.qt.vcpkg-qt }} and ${{ matrix.qt.vcpkg-tinyorm }} (classic mode) + if: matrix.build-type.key == 'debug' + run: >- + vcpkg.exe remove --recurse vcpkg-cmake vcpkg-cmake-config zlib ${{ matrix.qt.vcpkg-qt }} + ${{ matrix.qt.vcpkg-tinyorm }} - name: vcpkg install ${{ matrix.qt.vcpkg-qt }} (classic mode) if: matrix.build-type.key == 'debug'