Skip to content

Commit d5b2bcf

Browse files
committed
ci: Selectively check out submodules
Check out only the needed submodules in each job to reduce unnecessary network load and job preparation time. This will be especially important later when host tool components, such as QEMU, are added as submodules. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent cf1ab2f commit d5b2bcf

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,17 +566,29 @@ jobs:
566566
if: ${{ github.event_name != 'pull_request_target' }}
567567
uses: actions/checkout@v4
568568
with:
569-
submodules: recursive
570569
persist-credentials: false
571570

572571
- name: Check out source code (pull request)
573572
if: ${{ github.event_name == 'pull_request_target' }}
574573
uses: actions/checkout@v4
575574
with:
576575
ref: ${{ github.event.pull_request.head.sha }}
577-
submodules: recursive
578576
persist-credentials: false
579577

578+
- name: Check out submodules
579+
run: |
580+
git submodule init
581+
git submodule update --recursive crosskit/crosskit-x86_64-apple-darwin
582+
git submodule update --recursive crosskit/crosskit-x86_64-darwin-libpython
583+
git submodule update --recursive crosskit/crosskit-mingw-w64-libpython
584+
git submodule update --recursive crosstool-ng
585+
git submodule update --recursive binutils
586+
git submodule update --recursive binutils_arc
587+
git submodule update --recursive gdb
588+
git submodule update --recursive gcc
589+
git submodule update --recursive gcc_arc
590+
git submodule update --recursive picolibc
591+
580592
- name: Build crosstool-ng
581593
run: |
582594
# Configure macOS build environment
@@ -884,17 +896,21 @@ jobs:
884896
if: ${{ github.event_name != 'pull_request_target' }}
885897
uses: actions/checkout@v4
886898
with:
887-
submodules: recursive
888899
persist-credentials: false
889900

890901
- name: Check out source code (pull request)
891902
if: ${{ github.event_name == 'pull_request_target' }}
892903
uses: actions/checkout@v4
893904
with:
894905
ref: ${{ github.event.pull_request.head.sha }}
895-
submodules: recursive
896906
persist-credentials: false
897907

908+
- name: Check out submodules
909+
run: |
910+
git submodule init
911+
git submodule update --recursive llvm
912+
git submodule update --recursive picolibc
913+
898914
- name: Setup debug session (pre)
899915
if: always() && needs.setup.outputs.debug == 'toolchain-pre'
900916
uses: mxschmitt/action-tmate@v3
@@ -1020,17 +1036,19 @@ jobs:
10201036
if: ${{ github.event_name != 'pull_request_target' }}
10211037
uses: actions/checkout@v4
10221038
with:
1023-
submodules: recursive
10241039
persist-credentials: false
10251040

10261041
- name: Check out source code (pull request)
10271042
if: ${{ github.event_name == 'pull_request_target' }}
10281043
uses: actions/checkout@v4
10291044
with:
10301045
ref: ${{ github.event.pull_request.head.sha }}
1031-
submodules: recursive
10321046
persist-credentials: false
10331047

1048+
- name: Check out submodules
1049+
run: |
1050+
git submodule init
1051+
10341052
- name: Configure AWS Credentials
10351053
uses: aws-actions/configure-aws-credentials@v4
10361054
with:

0 commit comments

Comments
 (0)