Skip to content

Commit 865774e

Browse files
committed
Try workaround clone problems.
1 parent 84f0937 commit 865774e

1 file changed

Lines changed: 38 additions & 3 deletions

File tree

‎.github/workflows/canary.yml‎

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343
# vars.CANARY_COUNTER_BASE
4444
# Optional offset added to github.run_number for the build counter
4545
# (to stay above counters published by an earlier workflow).
46+
# vars.CANARY_CPPGIR_MIRROR
47+
# Optional git URL replacing https://gitlab.com/mnauw/cppgir.git
48+
# for the Linux job's nested submodule clone. gitlab.com refuses
49+
# (HTTP 403) the Depot runners this workflow uses; a mirror of
50+
# that repository on github.com is the way around it.
4651
# vars.CANARY_BOT_API_IMAGE
4752
# Digest-pinned Bot API server image built from a pinned
4853
# tdlib/telegram-bot-api ref by canary-bot-api.yml, e.g.
@@ -359,8 +364,15 @@ jobs:
359364
# actions/checkout adds its own Authorization header on top of
360365
# the one above and GitHub rejects the duplicate. The submodules
361366
# are public repositories and need no credentials.
367+
#
368+
# Not recursive: the only nested submodule any build needs is
369+
# cmake/external/glib/cppgir, which cmake/external adds under
370+
# if (LINUX) — so Windows and macOS never compile it. Skipping
371+
# it keeps gitlab.com, which regularly answers 403 to cloud
372+
# runners, out of these jobs; the other nested submodules are
373+
# documentation (range-v3 gh-pages, libcbor doxygen-theme).
362374
cd $TBUILD/$REPO_NAME
363-
git submodule update --init --recursive --depth=1
375+
git submodule update --init --depth=1
364376
365377
- name: Read canary configuration.
366378
shell: bash
@@ -675,7 +687,10 @@ jobs:
675687
- name: Clone.
676688
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
677689
with:
678-
submodules: recursive
690+
# Not recursive, see the Windows job: nothing macOS compiles
691+
# lives in a nested submodule, and recursing would clone
692+
# cppgir from gitlab.com once per arch of this matrix.
693+
submodules: true
679694
path: ${{ env.REPO_NAME }}
680695

681696
- name: Read canary configuration.
@@ -1062,7 +1077,27 @@ jobs:
10621077
- name: Clone.
10631078
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
10641079
with:
1065-
submodules: recursive
1080+
submodules: true
1081+
1082+
- name: Nested submodules.
1083+
env:
1084+
CPPGIR_MIRROR: ${{ vars.CANARY_CPPGIR_MIRROR }}
1085+
run: |
1086+
# This platform is the only one that compiles cppgir
1087+
# (cmake/external adds glib under if (LINUX)), so it is the
1088+
# only job that clones from gitlab.com. Recursing here instead
1089+
# of in the checkout keeps the documentation-only nested
1090+
# submodules (range-v3 gh-pages, libcbor doxygen-theme) out.
1091+
#
1092+
# gitlab.com answers 403 to the Depot runners every job here
1093+
# uses, while GitHub-hosted runners reach it fine, so the clone
1094+
# can be pointed at a mirror of cppgir without touching
1095+
# .gitmodules, which belongs to desktop-app/cmake_helpers.
1096+
if [ -n "$CPPGIR_MIRROR" ]; then
1097+
git config --global \
1098+
url."$CPPGIR_MIRROR".insteadOf https://gitlab.com/mnauw/cppgir.git
1099+
fi
1100+
git -C cmake submodule update --init --recursive --depth=1
10661101
10671102
- name: Read canary configuration.
10681103
run: |

0 commit comments

Comments
 (0)