cache vcpkg buildtrees

This commit is contained in:
Lion Kortlepel
2023-12-05 16:23:02 +01:00
parent 5ed220c58d
commit fa3da4ddf2
3 changed files with 16 additions and 6 deletions

View File

@@ -24,14 +24,23 @@ jobs:
- name: Install Dependencies
run: bash ./scripts/debian-11/1-install-deps.sh
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
- name: Restore vcpkg
id: cache-vcpkg-restore
uses: actions/cache/restore@v3
with:
runVcpkgInstall: true
path: ./vcpkg/buildtrees
key: ${{ runner.os }}-${{ github.job }}-vcpkg
- name: Create Build Environment
run: bash ./scripts/debian-11/2-configure.sh '-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: Cache vcpkg
id: cache-vcpkg
uses: actions/cache/save@v3
with:
path: ./vcpkg/buildtrees
key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }}
- name: Build Server
run: bash ./scripts/debian-11/3-build.sh

View File

@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
if (WIN32)
set(VCPKG_TARGET_TRIPLET x64-windows-static)
endif()
include(cmake/Vcpkg.cmake) # needs to happen before project()
project(

View File

@@ -1,7 +1,4 @@
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if (WIN32)
set(VCPKG_TARGET_TRIPLET x64-windows-static)
endif()
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake)
find_package(Git)
if(Git_FOUND)