Merge bitcoin/bitcoin#33869: refactor: Avoid -W*-whitespace in git archive
fa95353902ci: Run macos tasks in a git archive, not git checkout (MarcoFalke)faf99ae379refactor: Avoid -W*-whitespace in git archive (MarcoFalke) Pull request description: Otherwise, compilation with GCC-15+ will warn about it: ``` src/clientversion.cpp:33:79: error: trailing whitespace [-Werror=trailing-whitespace=] 33 | //! git will put "#define GIT_COMMIT_ID ..." on the next line inside archives. ``` Follow-up to https://github.com/bitcoin/bitcoin/pull/32482#issuecomment-3522280482 Can be tested via `git archive --output=/tmp/a.tar HEAD` ACKs for top commit: fanquake: ACKfa95353902Tree-SHA512: 73940ffc0fd83db557275bd5e993a3c47c5397682a1188447c48e077ead597ba0fc3e5ef9da7b746746ff04a26022ce35ac10768888bbd4707f25b799af43e45
This commit is contained in:
2 files changed
+14
-4
No files matched your search
@@ -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 }}
|
||||
|
||||
|
||||
@@ -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 <bitcoin-build-config.h> // IWYU pragma: keep
|
||||
|
||||
#include <clientversion.h>
|
||||
|
||||
#include <util/string.h>
|
||||
#include <util/translation.h>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user