diff options
| author | Angus Gratton <angus@redyak.com.au> | 2024-12-10 15:34:12 +1100 |
|---|---|---|
| committer | Angus Gratton <gus@projectgus.com> | 2024-12-18 15:11:01 +1100 |
| commit | 92a5ea51b456e96332f703aded4be2fbc22982fc (patch) | |
| tree | 18d3ca02e807df8bf587854f17c7a5eb033e72c2 /.github | |
| parent | d10cda66dcff1b760ebc550c7f9352220fe4163f (diff) | |
ci: Cache Zephyr workspace installation.
Can save several minutes downloading the Zephyr docker image and/or cloning
repo from GitHub. Cache keyed on the Zephyr version, which AFAIK is the
only determinant for the workspace contents.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/ports_zephyr.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.github/workflows/ports_zephyr.yml b/.github/workflows/ports_zephyr.yml index 444b0973d..ff3e19c7e 100644 --- a/.github/workflows/ports_zephyr.yml +++ b/.github/workflows/ports_zephyr.yml @@ -30,9 +30,22 @@ jobs: docker-images: false swap-storage: false - uses: actions/checkout@v4 + - id: versions + name: Read Zephyr version + run: source tools/ci.sh && echo "ZEPHYR=$ZEPHYR_VERSION" | tee "$GITHUB_OUTPUT" + - name: Cached Zephyr Workspace + id: cache_workspace + uses: actions/cache@v4 + with: + # note that the Zephyr CI docker image is 15GB. At time of writing + # GitHub caches are limited to 10GB total for a project. So we only + # cache the "workspace" + path: ./zephyrproject + key: zephyr-workspace-${{ steps.versions.outputs.ZEPHYR }} - name: Install packages run: source tools/ci.sh && ci_zephyr_setup - name: Install Zephyr + if: steps.cache_workspace.outputs.cache-hit != 'true' run: source tools/ci.sh && ci_zephyr_install - name: Build run: source tools/ci.sh && ci_zephyr_build |
