4848 # 1.90.0 torn-header flakes). RUNNER_TEMP is only valid at step scope, so
4949 # export it via $GITHUB_ENV -- a job-level `env: runner.temp` fails to parse.
5050 - name : Set per-job Conan home
51- run : echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
51+ run : |
52+ # github-hosted: ephemeral per-job home, warmed by actions/cache below.
53+ # self-hosted: PERSISTENT home keyed on the runner instance. A runner
54+ # executes one job at a time, so this home is never contended (no
55+ # sqlite "failed to acquire database lock in 20s") while still keeping
56+ # the per-job isolation of #704/#710 -- no two concurrent jobs share it.
57+ # Being persistent, it also takes the GH cache-service restore off the
58+ # hot path: that restore times out on VM905 ("Failed to restore: The
59+ # operation cannot be completed in timeout") and its miss cascaded into
60+ # a cold from-source Boost rebuild on all 8 runners at once.
61+ if [ "${{ runner.environment }}" = "github-hosted" ]; then
62+ echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
63+ else
64+ echo "CONAN_HOME=$HOME/.conan2-ci/$RUNNER_NAME" >> "$GITHUB_ENV"
65+ fi
5266
5367 - name : Install system dependencies
5468 if : runner.environment == 'github-hosted'
7488 - name : Show committed Conan profile
7589 run : conan profile show -pr:a=ci/conan/linux-gcc13.profile
7690
77- - name : Restore Conan cache
91+ - name : Restore Conan cache (github-hosted only)
92+ if : runner.environment == 'github-hosted'
7893 uses : actions/cache@v5
7994 with :
8095 path : ${{ runner.temp }}/conan2
@@ -90,7 +105,16 @@ jobs:
90105 run : rm -rf build_ci
91106
92107 - name : Conan install
93- run : conan install . -pr:a=ci/conan/linux-gcc13.profile --build=missing --output-folder=build_ci
108+ run : |
109+ # Bounded retry: remote package downloads are the only network step
110+ # left here; a transient CDN/remote hiccup must not red a good PR.
111+ for attempt in 1 2 3; do
112+ if conan install . -pr:a=ci/conan/linux-gcc13.profile --build=missing --output-folder=build_ci; then exit 0; fi
113+ echo "conan install failed (attempt $attempt/3); retrying in $((attempt * 15))s"
114+ sleep $((attempt * 15))
115+ done
116+ echo "conan install failed after 3 attempts" >&2
117+ exit 1
94118
95119 - name : Configure
96120 run : cmake -S . -B build_ci -DCMAKE_TOOLCHAIN_FILE=build_ci/conan_toolchain.cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCOIN_DGB=ON
@@ -194,7 +218,21 @@ jobs:
194218 # torn-cache reds). Export via $GITHUB_ENV -- a job-level `env: runner.temp`
195219 # fails to parse.
196220 - name : Set per-job Conan home
197- run : echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
221+ run : |
222+ # github-hosted: ephemeral per-job home, warmed by actions/cache below.
223+ # self-hosted: PERSISTENT home keyed on the runner instance. A runner
224+ # executes one job at a time, so this home is never contended (no
225+ # sqlite "failed to acquire database lock in 20s") while still keeping
226+ # the per-job isolation of #704/#710 -- no two concurrent jobs share it.
227+ # Being persistent, it also takes the GH cache-service restore off the
228+ # hot path: that restore times out on VM905 ("Failed to restore: The
229+ # operation cannot be completed in timeout") and its miss cascaded into
230+ # a cold from-source Boost rebuild on all 8 runners at once.
231+ if [ "${{ runner.environment }}" = "github-hosted" ]; then
232+ echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
233+ else
234+ echo "CONAN_HOME=$HOME/.conan2-ci/$RUNNER_NAME" >> "$GITHUB_ENV"
235+ fi
198236
199237 - name : Install system dependencies
200238 if : runner.environment == 'github-hosted'
@@ -220,7 +258,8 @@ jobs:
220258 conan profile detect --force
221259 sed -i 's/compiler.cppstd=.*/compiler.cppstd=20/' "$(conan profile path default)"
222260
223- - name : Restore Conan cache
261+ - name : Restore Conan cache (github-hosted only)
262+ if : runner.environment == 'github-hosted'
224263 uses : actions/cache@v5
225264 with :
226265 path : ${{ runner.temp }}/conan2
@@ -236,7 +275,16 @@ jobs:
236275 run : rm -rf build_asan
237276
238277 - name : Conan install
239- run : conan install . --build=missing --output-folder=build_asan --settings=build_type=Release
278+ run : |
279+ # Bounded retry: remote package downloads are the only network step
280+ # left here; a transient CDN/remote hiccup must not red a good PR.
281+ for attempt in 1 2 3; do
282+ if conan install . --build=missing --output-folder=build_asan --settings=build_type=Release; then exit 0; fi
283+ echo "conan install failed (attempt $attempt/3); retrying in $((attempt * 15))s"
284+ sleep $((attempt * 15))
285+ done
286+ echo "conan install failed after 3 attempts" >&2
287+ exit 1
240288
241289 - name : Configure (Release + AsAN + UBSan)
242290 # NOTE 1: must match the build_type passed to `conan install` (Release).
@@ -325,7 +373,21 @@ jobs:
325373 # torn-cache reds). Export via $GITHUB_ENV -- a job-level `env: runner.temp`
326374 # fails to parse.
327375 - name : Set per-job Conan home
328- run : echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
376+ run : |
377+ # github-hosted: ephemeral per-job home, warmed by actions/cache below.
378+ # self-hosted: PERSISTENT home keyed on the runner instance. A runner
379+ # executes one job at a time, so this home is never contended (no
380+ # sqlite "failed to acquire database lock in 20s") while still keeping
381+ # the per-job isolation of #704/#710 -- no two concurrent jobs share it.
382+ # Being persistent, it also takes the GH cache-service restore off the
383+ # hot path: that restore times out on VM905 ("Failed to restore: The
384+ # operation cannot be completed in timeout") and its miss cascaded into
385+ # a cold from-source Boost rebuild on all 8 runners at once.
386+ if [ "${{ runner.environment }}" = "github-hosted" ]; then
387+ echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
388+ else
389+ echo "CONAN_HOME=$HOME/.conan2-ci/$RUNNER_NAME" >> "$GITHUB_ENV"
390+ fi
329391
330392 - name : Install system dependencies
331393 if : runner.environment == 'github-hosted'
@@ -351,7 +413,8 @@ jobs:
351413 conan profile detect --force
352414 sed -i 's/compiler.cppstd=.*/compiler.cppstd=20/' "$(conan profile path default)"
353415
354- - name : Restore Conan cache
416+ - name : Restore Conan cache (github-hosted only)
417+ if : runner.environment == 'github-hosted'
355418 uses : actions/cache@v5
356419 with :
357420 path : ${{ runner.temp }}/conan2
@@ -367,7 +430,16 @@ jobs:
367430 run : rm -rf build_bch
368431
369432 - name : Conan install
370- run : conan install . --build=missing --output-folder=build_bch --settings=build_type=Release
433+ run : |
434+ # Bounded retry: remote package downloads are the only network step
435+ # left here; a transient CDN/remote hiccup must not red a good PR.
436+ for attempt in 1 2 3; do
437+ if conan install . --build=missing --output-folder=build_bch --settings=build_type=Release; then exit 0; fi
438+ echo "conan install failed (attempt $attempt/3); retrying in $((attempt * 15))s"
439+ sleep $((attempt * 15))
440+ done
441+ echo "conan install failed after 3 attempts" >&2
442+ exit 1
371443
372444 - name : Configure (-DCOIN_BCH=ON)
373445 run : cmake -S . -B build_bch -DCMAKE_TOOLCHAIN_FILE=build_bch/conan_toolchain.cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCOIN_BCH=ON
@@ -421,7 +493,21 @@ jobs:
421493 # torn-cache reds). Export via $GITHUB_ENV -- a job-level `env: runner.temp`
422494 # fails to parse.
423495 - name : Set per-job Conan home
424- run : echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
496+ run : |
497+ # github-hosted: ephemeral per-job home, warmed by actions/cache below.
498+ # self-hosted: PERSISTENT home keyed on the runner instance. A runner
499+ # executes one job at a time, so this home is never contended (no
500+ # sqlite "failed to acquire database lock in 20s") while still keeping
501+ # the per-job isolation of #704/#710 -- no two concurrent jobs share it.
502+ # Being persistent, it also takes the GH cache-service restore off the
503+ # hot path: that restore times out on VM905 ("Failed to restore: The
504+ # operation cannot be completed in timeout") and its miss cascaded into
505+ # a cold from-source Boost rebuild on all 8 runners at once.
506+ if [ "${{ runner.environment }}" = "github-hosted" ]; then
507+ echo "CONAN_HOME=$RUNNER_TEMP/conan2" >> "$GITHUB_ENV"
508+ else
509+ echo "CONAN_HOME=$HOME/.conan2-ci/$RUNNER_NAME" >> "$GITHUB_ENV"
510+ fi
425511
426512 - name : Install system dependencies
427513 if : runner.environment == 'github-hosted'
@@ -447,7 +533,8 @@ jobs:
447533 conan profile detect --force
448534 sed -i 's/compiler.cppstd=.*/compiler.cppstd=20/' "$(conan profile path default)"
449535
450- - name : Restore Conan cache
536+ - name : Restore Conan cache (github-hosted only)
537+ if : runner.environment == 'github-hosted'
451538 uses : actions/cache@v5
452539 with :
453540 path : ${{ runner.temp }}/conan2
@@ -463,7 +550,16 @@ jobs:
463550 run : rm -rf build_bch_asan
464551
465552 - name : Conan install
466- run : conan install . --build=missing --output-folder=build_bch_asan --settings=build_type=Release
553+ run : |
554+ # Bounded retry: remote package downloads are the only network step
555+ # left here; a transient CDN/remote hiccup must not red a good PR.
556+ for attempt in 1 2 3; do
557+ if conan install . --build=missing --output-folder=build_bch_asan --settings=build_type=Release; then exit 0; fi
558+ echo "conan install failed (attempt $attempt/3); retrying in $((attempt * 15))s"
559+ sleep $((attempt * 15))
560+ done
561+ echo "conan install failed after 3 attempts" >&2
562+ exit 1
467563
468564 - name : Configure (Release + AsAN + UBSan, -DCOIN_BCH=ON)
469565 run : |
0 commit comments