Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/vcpkg-triplets/x64-linux-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
)
8 changes: 7 additions & 1 deletion .github/workflows/build_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/vcpkg-binary-cache
key: vcpkg-binaries-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}
key: vcpkg-binaries-${{ matrix.platform }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', '.github/vcpkg-triplets/**') }}
restore-keys: |
vcpkg-binaries-${{ matrix.platform }}-

Expand All @@ -75,6 +75,9 @@ jobs:
# volume and persist for actions/cache to save.
export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
export VCPKG_BINARY_SOURCES="clear;files,$GITHUB_WORKSPACE/vcpkg-binary-cache,readwrite"
export VCPKG_TARGET_TRIPLET=x64-linux-release
export VCPKG_HOST_TRIPLET=x64-linux-release
export VCPKG_OVERLAY_TRIPLETS="$GITHUB_WORKSPACE/.github/vcpkg-triplets"

# Clean intermediate vcpkg artifacts but preserve binary cache and downloads
rm -rf vcpkg/buildtrees vcpkg/packages vcpkg/vcpkg_installed \
Expand All @@ -95,6 +98,9 @@ jobs:
-DCMAKE_MAKE_PROGRAM=$CMAKE_MAKE_PROGRAM \
-DCMAKE_TOOLCHAIN_FILE=$PWD/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DVCPKG_TARGET_TRIPLET=$VCPKG_TARGET_TRIPLET \
-DVCPKG_HOST_TRIPLET=$VCPKG_HOST_TRIPLET \
-DVCPKG_OVERLAY_TRIPLETS=$VCPKG_OVERLAY_TRIPLETS \
-DENABLE_CCACHE=ON \
-DENABLE_TESTS=ON \
${CMAKE_PREFIX_PATH:+-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH}
Expand Down
Loading