Skip to content

Commit 8ac09c9

Browse files
committed
ci: save/restore west repositories from cache
1 parent 91f073e commit 8ac09c9

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/package_core.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,25 @@ jobs:
3030
fetch-depth: 0
3131
persist-credentials: false
3232

33+
- name: ccache
34+
uses: hendrikmuhs/[email protected]
35+
with:
36+
verbose: 1
37+
38+
- name: Use west repo cache
39+
uses: actions/cache/restore@v4
40+
with:
41+
path: "**/.git"
42+
key: west-git-${{ github.event.repository.updated_at }}
43+
partial-key: west-git-
44+
3345
- name: Initialize
3446
run: |
3547
./extra/bootstrap.sh -o=--filter=tree:0
3648
echo "CORE_TAG=$(git describe --always)" >> "$GITHUB_ENV"
3749
echo "CORE_ARTIFACT=ArduinoCore-zephyr-$(git describe --always)" >> "$GITHUB_ENV"
3850
echo "BOARD_NAMES=[ $(cat boards.txt | grep '^[^#]*\.build\.variant' | cut -d '.' -f 1 | xargs printf '"%s",' | sed -e 's/,$//') ]" >> "$GITHUB_ENV"
3951
40-
- name: ccache
41-
uses: hendrikmuhs/[email protected]
42-
with:
43-
verbose: 1
44-
4552
- name: Build variants
4653
run: |
4754
./extra/build_all.sh -f
@@ -57,6 +64,12 @@ jobs:
5764
name: ${{ env.CORE_ARTIFACT }}
5865
path: ${{ env.CORE_ARTIFACT }}.tar.bz2
5966

67+
- name: Save west repo cache
68+
uses: actions/cache/save@v4
69+
with:
70+
path: "**/.git"
71+
key: west-git-${{ github.event.repository.updated_at }}
72+
6073
test-core:
6174
name: Test ${{ matrix.board }} board
6275
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)