From 976b484caf03061c6b6adc09370deb2d0b591567 Mon Sep 17 00:00:00 2001 From: Andre Meij Date: Tue, 31 Mar 2026 22:22:10 +0200 Subject: [PATCH 1/2] fix: replace NuGet/Mono binary caching with vcpkg files backend NuGet 7.x dropped Mono support, causing a SIGABRT when vcpkg attempted to initialise the NuGet binary cache on Linux. Replacing the NuGet backend with vcpkg's built-in files backend provides the same caching behaviour without any Mono or .NET dependency. We can restore caching for CI using Githib actions/cache. Let me know if you want me to open a PR for the .github/actions/build.yml to cache between runs. --- .docker/core.bake.Dockerfile | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.docker/core.bake.Dockerfile b/.docker/core.bake.Dockerfile index abc3d6dad9..fc3adfb857 100644 --- a/.docker/core.bake.Dockerfile +++ b/.docker/core.bake.Dockerfile @@ -26,7 +26,6 @@ FROM ubuntu:24.04 AS vcpkg-base pkg-config \ cmake \ ninja-build \ - mono-devel \ && rm -rf /var/lib/apt/lists/* # Install vcpkg @@ -39,31 +38,20 @@ FROM ubuntu:24.04 AS vcpkg-base ENV VCPKG_ROOT=/opt/vcpkg ENV PATH="${VCPKG_ROOT}:${PATH}" - ENV VCPKG_BINARY_SOURCES="clear;nuget,NuGetCache,readwrite;nugettimeout,3600" + ENV VCPKG_BINARY_SOURCES="clear;files,/nuget-cache,readwrite" FROM vcpkg-base AS vcpkg-local - RUN vcpkg fetch nuget && \ - mkdir /nuget-cache && \ - mono $(vcpkg fetch nuget) sources add \ - -Source "/nuget-cache" \ - -Name "NuGetCache" + RUN mkdir -p /nuget-cache FROM vcpkg-base AS vcpkg-remote ARG NUGET_REMOTE_URL - ARG NUGET_USERNAME - ARG NUGET_PASSWORD - - RUN vcpkg fetch nuget && \ - mono $(vcpkg fetch nuget) sources add \ - -Source "${NUGET_REMOTE_URL}" \ - -Name "NuGetCache" \ - -Username "${NUGET_USERNAME}" \ - -Password "${NUGET_PASSWORD}" \ - -StorePasswordInClearText + + RUN mkdir -p /nuget-cache + # Remote file cache: mount or pre-populate /nuget-cache from ${NUGET_REMOTE_URL} as needed From d7315775ee6b1b6369edf0abe0d73ea6d57ce043 Mon Sep 17 00:00:00 2001 From: Andre Meij Date: Tue, 31 Mar 2026 23:03:58 +0200 Subject: [PATCH 2/2] fix: add vcpkg binary caching and arch-aware triplet to CI Enable the x-gha vcpkg binary cache backend so compiled vcpkg packages are reused across workflow runs instead of being rebuilt from scratch. Derive VCPKG_TARGET_TRIPLET from runner.arch so the workflow works correctly on both x64 and ARM64 self-hosted runners. --- .github/workflows/build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 375f876dfb..c0eb93fc0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ jobs: PLEASE_PRELOAD_LIBSTDCPP: true CC: clang-13 CXX: clang++-13 + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" steps: - name: Checkout repository @@ -73,12 +74,20 @@ jobs: echo "clang and clang-13 are both v13" + - name: Expose GitHub Actions cache tokens for vcpkg x-gha backend + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + - name: Set up vcpkg uses: lukka/run-vcpkg@v11 - name: Configure core, build third_party libs (ICU, V8, etc.) run: | - cmake -GNinja -S . -B build -DVCPKG_TARGET_TRIPLET=x64-linux-dynamic -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DVCPKG_MANIFEST_MODE=ON -DVCPKG_MANIFEST_DIR=. + TRIPLET=${{ runner.arch == 'ARM64' && 'arm64-linux-dynamic' || 'x64-linux-dynamic' }} + cmake -GNinja -S . -B build -DVCPKG_TARGET_TRIPLET=${TRIPLET} -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DVCPKG_MANIFEST_MODE=ON -DVCPKG_MANIFEST_DIR=. - name: Build core (x2t, docbuilder, etc.) run: |