ci: cache vcpkg
Fixes:7712
This commit is contained in:
parent
ba5eaa4c90
commit
33b14ccc5c
2 changed files with 14 additions and 15 deletions
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
|
@ -109,7 +109,8 @@ jobs:
|
||||||
name: ${{ matrix.target.name }}
|
name: ${{ matrix.target.name }}
|
||||||
runs-on: ${{ matrix.target.runs-on }}
|
runs-on: ${{ matrix.target.runs-on }}
|
||||||
container: ${{ matrix.target.container }}
|
container: ${{ matrix.target.container }}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 120
|
||||||
|
# If vcpkg has to rebuild the cache it takes a while
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
# Normally, we want to fail fast, but in this case we shouldn't since one target may
|
# Normally, we want to fail fast, but in this case we shouldn't since one target may
|
||||||
|
|
@ -141,12 +142,6 @@ jobs:
|
||||||
|
|
||||||
key: vcpkg-${{ runner.os }}-1
|
key: vcpkg-${{ runner.os }}-1
|
||||||
|
|
||||||
- name: Cache deps dir
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ./deps
|
|
||||||
key: ${{ runner.os }}-deps-${{ hashFiles('config.yaml') }}
|
|
||||||
|
|
||||||
# This effectively runs `vcvarsall.bat`, etc. It's not actually installing
|
# This effectively runs `vcvarsall.bat`, etc. It's not actually installing
|
||||||
# VC++ as that's already pre-installed on the Windows runner.
|
# VC++ as that's already pre-installed on the Windows runner.
|
||||||
- name: Setup VC++ environment
|
- name: Setup VC++ environment
|
||||||
|
|
@ -159,14 +154,19 @@ jobs:
|
||||||
uses: seanmiddleditch/gha-setup-ninja@master
|
uses: seanmiddleditch/gha-setup-ninja@master
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
run: python ./scripts/install_deps.py --skip-vcpkg
|
||||||
VCPKG_ROOT: ${{github.workspace}}/vcpkg
|
|
||||||
run: python ./scripts/install_deps.py
|
- name: vcpkg build
|
||||||
|
id: vcpkg
|
||||||
|
uses: johnwason/vcpkg-action@v6
|
||||||
|
with:
|
||||||
|
manifest-dir: ${{ github.workspace }}
|
||||||
|
triplet: x64-windows-release
|
||||||
|
token: ${{ github.token }}
|
||||||
|
github-binarycache: true
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
env:
|
run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
|
||||||
VCPKG_ROOT: ${{github.workspace}}/vcpkg
|
|
||||||
run: cmake -B build --preset=windows-release -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -j8
|
run: cmake --build build -j8
|
||||||
|
|
|
||||||
|
|
@ -523,8 +523,7 @@ macro(configure_openssl)
|
||||||
|
|
||||||
find_package(OpenSSL 3.0 REQUIRED COMPONENTS SSL Crypto)
|
find_package(OpenSSL 3.0 REQUIRED COMPONENTS SSL Crypto)
|
||||||
if(WIN32) #Used for dev in TLS and WIX
|
if(WIN32) #Used for dev in TLS and WIX
|
||||||
cmake_path(SET OPENSSL_ROOT_DIR NORMALIZE
|
cmake_path(SET OPENSSL_ROOT_DIR NORMALIZE "${OPENSSL_INCLUDE_DIR}/..")
|
||||||
"${CMAKE_BINARY_DIR}/vcpkg_installed/x64-windows")
|
|
||||||
message(VERBOSE "Set OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}")
|
message(VERBOSE "Set OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}")
|
||||||
set(OPENSSL_EXE_DIR "${OPENSSL_ROOT_DIR}/tools/openssl")
|
set(OPENSSL_EXE_DIR "${OPENSSL_ROOT_DIR}/tools/openssl")
|
||||||
add_definitions(-DOPENSSL_EXE_DIR="${OPENSSL_EXE_DIR}")
|
add_definitions(-DOPENSSL_EXE_DIR="${OPENSSL_EXE_DIR}")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue