|
43 | 43 | # vars.CANARY_COUNTER_BASE |
44 | 44 | # Optional offset added to github.run_number for the build counter |
45 | 45 | # (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. |
46 | 51 | # vars.CANARY_BOT_API_IMAGE |
47 | 52 | # Digest-pinned Bot API server image built from a pinned |
48 | 53 | # tdlib/telegram-bot-api ref by canary-bot-api.yml, e.g. |
@@ -359,8 +364,15 @@ jobs: |
359 | 364 | # actions/checkout adds its own Authorization header on top of |
360 | 365 | # the one above and GitHub rejects the duplicate. The submodules |
361 | 366 | # 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). |
362 | 374 | cd $TBUILD/$REPO_NAME |
363 | | - git submodule update --init --recursive --depth=1 |
| 375 | + git submodule update --init --depth=1 |
364 | 376 |
|
365 | 377 | - name: Read canary configuration. |
366 | 378 | shell: bash |
@@ -675,7 +687,10 @@ jobs: |
675 | 687 | - name: Clone. |
676 | 688 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
677 | 689 | 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 |
679 | 694 | path: ${{ env.REPO_NAME }} |
680 | 695 |
|
681 | 696 | - name: Read canary configuration. |
@@ -1062,7 +1077,27 @@ jobs: |
1062 | 1077 | - name: Clone. |
1063 | 1078 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
1064 | 1079 | 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 |
1066 | 1101 |
|
1067 | 1102 | - name: Read canary configuration. |
1068 | 1103 | run: | |
|
0 commit comments