3838 - name : Checkout repository
3939 uses : actions/checkout@v4
4040 with :
41- submodules : recursive
42- fetch-depth : 0
41+ fetch-depth : 1
42+ submodules : false
43+
44+ - name : Resolve esp-matter revision
45+ id : esp-matter-rev
46+ shell : bash
47+ run : |
48+ set -euo pipefail
49+ printf 'sha=%s\n' "$(git rev-parse HEAD:esp-matter)" >> "${GITHUB_OUTPUT}"
50+
51+ - name : Restore submodule cache
52+ id : restore-submodules
53+ uses : actions/cache/restore@v4
54+ with :
55+ path : |
56+ esp-matter
57+ .git/modules/esp-matter
58+ key : ${{ runner.os }}-esp-matter-submodules-v1-${{ hashFiles('.gitmodules') }}-${{ steps.esp-matter-rev.outputs.sha }}
59+
60+ - name : Sync submodules
61+ shell : bash
62+ run : |
63+ set -euo pipefail
64+ git submodule sync --recursive
65+ git submodule update --init --recursive --jobs 4
66+
67+ - name : Save submodule cache
68+ if : steps.restore-submodules.outputs.cache-hit != 'true'
69+ uses : actions/cache/save@v4
70+ with :
71+ path : |
72+ esp-matter
73+ .git/modules/esp-matter
74+ key : ${{ steps.restore-submodules.outputs.cache-primary-key }}
4375
4476 - name : Install Python native build deps
4577 shell : bash
5789 uses : actions/cache/restore@v4
5890 with :
5991 path : esp-matter/connectedhomeip/connectedhomeip/.environment
60- key : ${{ runner.os }}-matter-bootstrap-v2-${{ hashFiles('esp-matter/connectedhomeip/connectedhomeip/scripts/setup/**/*.txt', 'esp-matter/connectedhomeip/connectedhomeip/scripts/setup/**/*.json', 'esp-matter/connectedhomeip/connectedhomeip/BUILD.gn', 'esp-matter/install.sh') }}
92+ key : ${{ runner.os }}-matter-bootstrap-v2-${{
93+ hashFiles('esp-matter/connectedhomeip/connectedhomeip/scripts/setup/**/*.txt',
94+ ' esp-matter/connectedhomeip/connectedhomeip/scripts/setup/**/*.json' ,
95+ ' esp-matter/connectedhomeip/connectedhomeip/BUILD.gn' ,
96+ ' esp-matter/install.sh' ) }}
6197
6298 - name : Bootstrap Matter environment
6399 shell : bash
84120 uses : actions/cache/restore@v4
85121 with :
86122 path : /root/.cache/pip
87- key : ${{ runner.os }}-esp-matter-pip-v1-${{ hashFiles('esp-matter/requirements.txt') }}
123+ key : ${{ runner.os }}-esp-matter-pip-v1-${{
124+ hashFiles('esp-matter/requirements.txt') }}
88125
89126 - name : Install repo-local Python deps
90127 shell : bash
@@ -104,7 +141,8 @@ jobs:
104141 uses : actions/cache/restore@v4
105142 with :
106143 path : .ccache
107- key : ${{ runner.os }}-light-c6-thread-ccache-v1-${{ github.ref_name }}-${{ github.sha }}
144+ key : ${{ runner.os }}-light-c6-thread-ccache-v1-${{ github.ref_name }}-${{
145+ github.sha }}
108146 restore-keys : |
109147 ${{ runner.os }}-light-c6-thread-ccache-v1-${{ github.ref_name }}-
110148 ${{ runner.os }}-light-c6-thread-ccache-v1-
0 commit comments