Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Merged
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
41 changes: 41 additions & 0 deletions .github/actions/setup-vcpkg/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Set up cached vcpkg
description: Bootstrap the pinned vcpkg checkout and restore its binary and source caches.

inputs:
cache-key:
description: Stable compiler-family key used to separate incompatible binary archives.
required: true
vcpkg-directory:
description: Directory containing the pinned vcpkg checkout.
default: ${{ github.workspace }}/.cache/vcpkg
required: false

runs:
using: composite
steps:
- name: Prepare vcpkg binary cache
shell: bash
run: mkdir -p "$GITHUB_WORKSPACE/.cache/vcpkg-binary-cache"

- name: Set up pinned vcpkg
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
with:
vcpkgDirectory: ${{ inputs.vcpkg-directory }}
vcpkgJsonGlob: vcpkg.json

- name: Restore vcpkg binary archives
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ github.workspace }}/.cache/vcpkg-binary-cache
key: vcpkg-binary-v1-${{ runner.os }}-${{ inputs.cache-key }}-${{ hashFiles('vcpkg.json', 'Justfile') }}
restore-keys: |
vcpkg-binary-v1-${{ runner.os }}-${{ inputs.cache-key }}-

- name: Restore vcpkg source archives
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.vcpkg-directory }}/downloads
key: vcpkg-assets-v1-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-assets-v1-${{ runner.os }}-
7 changes: 4 additions & 3 deletions .github/workflows/_sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
MSAN_OPTIONS: ${{ inputs.msan_options }}
TSAN_OPTIONS: ${{ inputs.tsan_options }}
UBSAN_OPTIONS: ${{ inputs.ubsan_options }}
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.cache/vcpkg-binary-cache,readwrite

steps:
- name: Check out repository
Expand All @@ -74,10 +75,10 @@ jobs:
- name: Set up pkgx
uses: pkgxdev/setup@4d4ae97af87ccb39ab8be4e073dea697fef2c6f7 # v5.0.0

- name: Restore artifacts or set up vcpkg
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
- name: Set up cached vcpkg
uses: ./.github/actions/setup-vcpkg
with:
vcpkgJsonGlob: vcpkg.json
cache-key: clang-22

- name: Build and exercise sanitizer configuration
env:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
platform:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.cache/vcpkg-binary-cache,readwrite

strategy:
fail-fast: false
Expand All @@ -34,6 +36,7 @@ jobs:
compiler_cache: ccache
compiler_cache_key: gcc-16
run_parallel_contract: true
vcpkg_cache_key: gcc-16
- name: Ubuntu Clang
os: ubuntu-latest
compiler_package: llvm.org@22
Expand All @@ -42,6 +45,7 @@ jobs:
compiler_cache: ccache
compiler_cache_key: clang-22
run_parallel_contract: true
vcpkg_cache_key: clang-22
- name: macOS AppleClang
os: macos-latest
compiler_package: ""
Expand All @@ -50,6 +54,7 @@ jobs:
compiler_cache: ""
compiler_cache_key: none
run_parallel_contract: false
vcpkg_cache_key: appleclang
- name: Windows MSVC
os: windows-latest
compiler_package: ""
Expand All @@ -58,6 +63,7 @@ jobs:
compiler_cache: ""
compiler_cache_key: none
run_parallel_contract: false
vcpkg_cache_key: msvc

steps:
- name: Disable Git autocrlf on Windows
Expand Down Expand Up @@ -163,11 +169,10 @@ jobs:
shell: pwsh
run: Add-Content -Path $env:GITHUB_ENV -Value 'VCPKG_DEFAULT_TRIPLET=x64-windows'

- name: Restore artifacts or set up vcpkg
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
- name: Set up cached vcpkg
uses: ./.github/actions/setup-vcpkg
with:
vcpkgDirectory: ${{ github.workspace }}/.cache/vcpkg
vcpkgJsonGlob: vcpkg.json
cache-key: ${{ matrix.vcpkg_cache_key }}

- name: Restore compiler cache
if: matrix.compiler_cache != ''
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/codecov-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
permissions:
contents: read
id-token: write # Intentionally required for Codecov's OIDC upload.
env:
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.cache/vcpkg-binary-cache,readwrite

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -89,10 +91,10 @@ jobs:
ninja --version
gcc --version

- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
- name: Set up cached vcpkg
uses: ./.github/actions/setup-vcpkg
with:
vcpkgJsonGlob: vcpkg.json
cache-key: gcc-16

- name: Generate coverage reports
env:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
# only required for workflows in private repositories
actions: read
contents: read
env:
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.cache/vcpkg-binary-cache,readwrite

strategy:
fail-fast: false
Expand All @@ -72,11 +74,11 @@ jobs:
if: matrix.language == 'c-cpp'
uses: pkgxdev/setup@4d4ae97af87ccb39ab8be4e073dea697fef2c6f7 # v5.0.0

- name: Restore artifacts or set up vcpkg
- name: Set up cached vcpkg
if: matrix.language == 'c-cpp'
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
uses: ./.github/actions/setup-vcpkg
with:
vcpkgJsonGlob: vcpkg.json
cache-key: gcc-16

- name: Prepare C++ dependencies outside CodeQL tracing
if: matrix.language == 'c-cpp'
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,10 @@ only writes when the rendered release and hash assignments differ from the boots
On Windows, invoke the synchronizer with `python.exe scripts\sync_vcpkg_tool_pins.py`; `scripts\build.bat` and
`scripts\fast-build.bat` already invoke the bootstrap implementation directly.

CI uses `lukka/run-vcpkg`, which derives the vcpkg checkout commit from the same manifest baseline and supplies a
binary cache. No separately maintained checkout SHA is required; the bootstrap script retains an independent tool
release and Windows executable hashes as a supply-chain review gate.
CI uses the repository's cached-vcpkg action, which derives the vcpkg checkout commit from the same manifest baseline,
stores compiler-specific binary archives through `actions/cache`, and separately caches downloaded source archives.
No separately maintained checkout SHA is required; the bootstrap script retains an independent tool release and
Windows executable hashes as a supply-chain review gate.

CodeQL keeps third-party implementation findings out of CDT++ results through a two-phase manual build.
`just codeql-prepare` configures the project, installs manifest dependencies before CodeQL starts tracing, and uses a
Expand Down
Loading