From 1cccdef95db507408624ec79a03fb5caeaec36dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Fri, 23 May 2025 19:43:05 +0200 Subject: [PATCH] Update GH Action to use builtin VCPKG. (#77) --- .github/workflows/build.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b177dc..1a71893 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,17 +20,14 @@ jobs: config: [Debug, Release] runs-on: windows-2022 steps: - # https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v7 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + # set VCPKG Root + - name: "Set environmental variables" + shell: bash + run: | + echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV # checkout USVFS and vcpkg - uses: actions/checkout@v4 - - uses: lukka/run-vcpkg@v11 - name: Restore vcpkg cache uses: actions/cache/restore@v4 @@ -41,8 +38,6 @@ jobs: # configure - run: cmake --preset vs2022-windows-${{ matrix.arch }} -B build_${{ matrix.arch }} "-DCMAKE_INSTALL_PREFIX=install/${{ matrix.config }}" - env: - VCPKG_ROOT: ${{ github.workspace }}/vcpkg - name: Save vcpkg cache uses: actions/cache/save@v4 @@ -52,8 +47,6 @@ jobs: # build - run: cmake --build build_${{ matrix.arch }} --config ${{ matrix.config }} --target INSTALL - env: - VCPKG_ROOT: ${{ github.workspace }}/vcpkg # package install - uses: actions/upload-artifact@master @@ -152,7 +145,7 @@ jobs: if: always() - run: ./test/bin/usvfs_global_test_runner_${{ matrix.arch }}.exe if: always() - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 if: always() with: name: tests-outputs_${{ matrix.config }}_${{ matrix.arch }}