Skip to content

Commit 8bd9401

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

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Diff for: .github/workflows/package_core.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,24 @@ 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+
partial-key: west-git-
43+
3344
- name: Initialize
3445
run: |
3546
./extra/bootstrap.sh -o=--filter=tree:0
3647
echo "CORE_TAG=$(git describe --always)" >> "$GITHUB_ENV"
3748
echo "CORE_ARTIFACT=ArduinoCore-zephyr-$(git describe --always)" >> "$GITHUB_ENV"
3849
echo "BOARD_NAMES=[ $(cat boards.txt | grep '^[^#]*\.build\.variant' | cut -d '.' -f 1 | xargs printf '"%s",' | sed -e 's/,$//') ]" >> "$GITHUB_ENV"
3950
40-
- name: ccache
41-
uses: hendrikmuhs/[email protected]
42-
with:
43-
verbose: 1
44-
4551
- name: Build variants
4652
run: |
4753
./extra/build_all.sh -f
@@ -57,6 +63,12 @@ jobs:
5763
name: ${{ env.CORE_ARTIFACT }}
5864
path: ${{ env.CORE_ARTIFACT }}.tar.bz2
5965

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

0 commit comments

Comments
 (0)