mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-16 21:30:12 +00:00
cache vcpkg buildtrees
This commit is contained in:
15
.github/workflows/linux.yml
vendored
15
.github/workflows/linux.yml
vendored
@@ -24,14 +24,23 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: bash ./scripts/debian-11/1-install-deps.sh
|
run: bash ./scripts/debian-11/1-install-deps.sh
|
||||||
|
|
||||||
- name: Setup vcpkg
|
- name: Restore vcpkg
|
||||||
uses: lukka/run-vcpkg@v11
|
id: cache-vcpkg-restore
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
with:
|
with:
|
||||||
runVcpkgInstall: true
|
path: ./vcpkg/buildtrees
|
||||||
|
key: ${{ runner.os }}-${{ github.job }}-vcpkg
|
||||||
|
|
||||||
- name: Create Build Environment
|
- name: Create Build Environment
|
||||||
run: bash ./scripts/debian-11/2-configure.sh '-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake'
|
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
|
- name: Build Server
|
||||||
run: bash ./scripts/debian-11/3-build.sh
|
run: bash ./scripts/debian-11/3-build.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
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()
|
include(cmake/Vcpkg.cmake) # needs to happen before project()
|
||||||
|
|
||||||
project(
|
project(
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
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)
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake)
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
if(Git_FOUND)
|
if(Git_FOUND)
|
||||||
|
|||||||
Reference in New Issue
Block a user