Skip to content

Commit ca5f8f0

Browse files
author
MacroFake
committed
Merge bitcoin#26436: [24.x] CI backports
7f2dc61 ci: Use same `merge_script` implementation for Windows as for all (Hennadii Stepanov) 14784aa ci: Move `git config` commands into script where they are used (Hennadii Stepanov) b126825 ci: Use remote pull/merge ref instead of local git merge (MacroFake) Pull request description: This PR backports: - bitcoin#26202 - bitcoin#26236 to avoid CI failures like that: - https://cirrus-ci.com/task/5653459278495744 - https://cirrus-ci.com/task/6075671743561728 ACKs for top commit: fanquake: ACK 7f2dc61 - backports look correct. Tree-SHA512: 46b45df8137efd42491dd3ac110c00e6e1bf4ab18a6bbbf68307fe976f391055b1987a22c101060ef5ae8ff1a2b738e197ad579754d1068d78f5eddcd45c7f69
2 parents 067dc42 + 7f2dc61 commit ca5f8f0

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.cirrus.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ filter_template: &FILTER_TEMPLATE
2424
base_template: &BASE_TEMPLATE
2525
<< : *FILTER_TEMPLATE
2626
merge_base_script:
27-
# Unconditionally install git (used in fingerprint_script) and set the
28-
# default git author name (used in verify-commits.py)
27+
# Unconditionally install git (used in fingerprint_script).
2928
- bash -c "$PACKAGE_MANAGER_INSTALL git"
30-
- git config --global user.email "[email protected]"
31-
- git config --global user.name "ci"
3229
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
33-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
34-
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
30+
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
31+
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
3532

3633
main_template: &MAIN_TEMPLATE
3734
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
@@ -117,14 +114,7 @@ task:
117114
QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
118115
IgnoreWarnIntDirInTempDetected: 'true'
119116
merge_script:
120-
- git config --global user.email "[email protected]"
121-
- git config --global user.name "ci"
122-
# Windows filesystem loses the executable bit, and all of the executable
123-
# files are considered "modified" now. It will break the following `git merge`
124-
# command. The next two commands make git ignore this issue.
125-
- git config core.filemode false
126-
- git reset --hard
127-
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
117+
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git checkout FETCH_HEAD; }
128118
msvc_qt_built_cache:
129119
folder: "%QTBASEDIR%"
130120
reupload_on_changes: false

ci/lint/06_script.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; t
3131
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
3232
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-git-root
3333
mapfile -t KEYS < contrib/verify-commits/trusted-keys
34+
git config user.email "[email protected]"
35+
git config user.name "ci"
3436
${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys "${KEYS[@]}" &&
3537
./contrib/verify-commits/verify-commits.py;
3638
fi

0 commit comments

Comments
 (0)