From faf99ae379636d6ef8316ffb2efaa61896343de9 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 13 Nov 2025 09:33:35 +0100 Subject: [PATCH 1/2] refactor: Avoid -W*-whitespace in git archive --- src/clientversion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/clientversion.cpp b/src/clientversion.cpp index d9e65037ae4..86610112ba0 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -1,10 +1,11 @@ -// Copyright (c) 2012-2022 The Bitcoin Core developers +// Copyright (c) 2012-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include // IWYU pragma: keep #include + #include #include @@ -30,7 +31,8 @@ const std::string UA_NAME("Satoshi"); // - "#define BUILD_GIT_COMMIT ...", if the top commit is not tagged // - "// No build information available", if proper git information is not available -//! git will put "#define GIT_COMMIT_ID ..." on the next line inside archives. $Format:%n#define GIT_COMMIT_ID "%H"$ +// git will expand the next line to "#define GIT_COMMIT_ID ..." inside archives: +//$Format:%n#define GIT_COMMIT_ID "%H"$ #ifdef BUILD_GIT_TAG #define BUILD_DESC BUILD_GIT_TAG From fa95353902b7a6f73f094e78106088ab3c16ce14 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 13 Nov 2025 15:52:57 +0100 Subject: [PATCH 2/2] ci: Run macos tasks in a git archive, not git checkout This confirms that compiling this way is possible at all. --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ffaafe329a..d2eecbfb817 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,7 @@ jobs: env: DANGER_RUN_CI_ON_HOST: 1 - BASE_ROOT_DIR: ${{ github.workspace }} + BASE_ROOT_DIR: ${{ github.workspace }}/repo_archive steps: - &CHECKOUT @@ -176,8 +176,16 @@ jobs: key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }} restore-keys: ${{ github.job }}-${{ matrix.job-type }}-ccache- + - name: Create git archive + run: | + git log -1 + git archive --format=tar --prefix=repo_archive/ --output=repo.tar HEAD + tar -xf repo.tar + - name: CI script - run: ./ci/test_run_all.sh + run: | + cd repo_archive + ./ci/test_run_all.sh env: FILE_ENV: ${{ matrix.file-env }}