Skip to content

Commit

Permalink
Switch to ccache for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Sep 8, 2024
1 parent 824426a commit 2380d0b
Showing 1 changed file with 6 additions and 33 deletions.
39 changes: 6 additions & 33 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,18 @@ jobs:
with:
path: site

- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
create-symlink: true
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-ccache

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install \
python2 qemu-utils
- name: Restore toolchain cache
uses: actions/cache/restore@v4
id: cache-restore
with:
path: |
openwrt/dl
openwrt/staging_dir
openwrt/feeds
# keep this in sync with the key on the restore action!
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-build-deps-${{ env.CACHE_BUSTER }}

- name: Mark cache as fresh
if: steps.cache-restore.outputs.cache-hit
run: |
find openwrt/build_dir/{host*,toolchain-*} -name .built\* -exec touch {} \; || true
touch openwrt/staging_dir/{host*,toolchain-*}/stamp/.* || true
- name: Debug cache restore
run: |
ls -la packages/ || true
ls -la openwrt/build_dir/ || true
ls -la openwrt/staging_dir/ || true
- name: Prepare Gluon
run: make update

Expand All @@ -100,13 +83,3 @@ jobs:
name: images-${{ matrix.target }}
path: output/images/
compression-level: 1

- name: Save toolchain cache
uses: actions/cache/save@v4
if: always()
with:
path: |
openwrt/dl
openwrt/staging_dir
openwrt/feeds
key: ${{ env.GLUON_RELEASE }}-${{ matrix.target }}-build-deps-${{ env.CACHE_BUSTER }}

0 comments on commit 2380d0b

Please sign in to comment.