1- name : Periodic Silent Merge Check
1+ # Copyright (c) 2023-present The Bitcoin Core developers
2+ # Distributed under the MIT software license, see the accompanying
3+ # file COPYING or https://opensource.org/license/mit.
4+
5+ name : Silent Merge Periodic Check
26
37on :
48 schedule :
711
812jobs :
913 verify-prs :
14+ name : ' Verify open PRs for silent merge conflicts'
1015 runs-on : ubuntu-latest
1116 permissions :
1217 checks : write
1318 pull-requests : read
1419 contents : read
20+ env :
21+ FILE_ENV : ' ./ci/test/00_setup_env_native_previous_releases.sh'
22+ DANGER_CI_ON_HOST_FOLDERS : 1
1523
1624 steps :
1725 - name : Checkout repo
1826 uses : actions/checkout@v4
1927 with :
2028 fetch-depth : 0
2129
22- - name : Install dependencies
23- run : |
24- sudo apt-get update
25- sudo apt-get install -y cmake build-essential
30+ - name : Configure environment
31+ uses : ./.github/actions/configure-environment
32+
33+ - name : Restore caches
34+ id : restore-cache
35+ uses : ./.github/actions/restore-caches
36+
37+ - name : Configure Docker
38+ uses : ./.github/actions/configure-docker
39+ with :
40+ use-cirrus : ${{ needs.runners.outputs.use-cirrus-runners }}
2641
2742 - name : Set up GitHub CLI
2843 run : gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
@@ -75,14 +90,17 @@ jobs:
7590 git fetch origin pull/$pr/head:pr-$pr
7691 git checkout pr-$pr
7792
78- mkdir -p build && cd build
79- cmake ..
80- if make -j$(nproc) && ctest --output-on-failure; then
81- conclusion=success
82- summary="CMake build and tests passed."
83- else
93+ ci_failed=false
94+ ./ci/test_run_all.sh || {
95+ echo "PR #$pr CI script failed."
96+ ci_failed=true
97+ }
98+ if [ "$ci_failed" = true ]; then
8499 conclusion=failure
85100 summary="CMake build or tests failed."
101+ else
102+ conclusion=success
103+ summary="CMake build and tests passed."
86104 fi
87105
88106 # --- Report result as a new check run ---
@@ -96,3 +114,68 @@ jobs:
96114 -F "output[summary]=$summary"
97115
98116 done
117+
118+ - name : Save caches
119+ uses : ./.github/actions/save-caches
120+ with :
121+ depends-sources-cache-hit : ${{ steps.restore-cache.depends-sources-cache-hit }}
122+ depends-built-cache-hit : ${{ steps.restore-cache.depends-built-cache-hit }}
123+
124+ previous-releases :
125+ name : ' Previous releases, depends DEBUG'
126+ if : contains(github.event.label.name, 'PeriodicMergeCICheck')
127+ needs : runners
128+ runs-on : ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md' || 'ubuntu-24.04' }}
129+
130+ env :
131+ FILE_ENV : ' ./ci/test/00_setup_env_native_previous_releases.sh'
132+ DANGER_CI_ON_HOST_FOLDERS : 1
133+
134+ steps :
135+ - name : Checkout
136+ uses : actions/checkout@v4
137+
138+ - name : Configure environment
139+ uses : ./.github/actions/configure-environment
140+
141+ - name : Restore caches
142+ id : restore-cache
143+ uses : ./.github/actions/restore-caches
144+
145+ - name : Configure Docker
146+ uses : ./.github/actions/configure-docker
147+ with :
148+ use-cirrus : ${{ needs.runners.outputs.use-cirrus-runners }}
149+
150+ - name : CI script
151+ run : ./ci/test_run_all.sh
152+
153+
154+ lint :
155+ name : ' Lint'
156+ if : contains(github.event.label.name, 'PeriodicMergeCICheck')
157+ needs : runners
158+ runs-on : ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
159+ timeout-minutes : 20
160+ env :
161+ CONTAINER_NAME : " bitcoin-linter"
162+ steps :
163+ - name : Checkout
164+ uses : actions/checkout@v4
165+ with :
166+ fetch-depth : 0
167+
168+ - name : Configure Docker
169+ uses : ./.github/actions/configure-docker
170+ with :
171+ use-cirrus : ${{ needs.runners.outputs.use-cirrus-runners }}
172+
173+ - name : CI script
174+ run : |
175+ set -o xtrace
176+ docker buildx build -t "$CONTAINER_NAME" $DOCKER_BUILD_CACHE_ARG --file "./ci/lint_imagefile" .
177+ CIRRUS_PR_FLAG=""
178+ if [ "${{ github.event_name }}" = "pull_request" ]; then
179+ CIRRUS_PR_FLAG="-e CIRRUS_PR=1"
180+ fi
181+ docker run --rm $CIRRUS_PR_FLAG -v "$(pwd)":/bitcoin "$CONTAINER_NAME"
0 commit comments