mirror of
https://github.com/ModOrganizer2/usvfs.git
synced 2026-07-27 14:04:27 -07:00
Update GH Action to use builtin VCPKG. (#77)
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user