mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-27 15:06:29 +00:00
Improve GitHub Action caching (#2732)
Use more specific keys for GitHub Action caches to make sure we update caches regularly. Also add board id to the downloads cache to get a more specific cache file. This avoid redownloading large dependencies of some boards.
This commit is contained in:
parent
79050fb820
commit
41c3b6565d
13
.github/workflows/dev.yml
vendored
13
.github/workflows/dev.yml
vendored
@ -116,13 +116,18 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: /mnt/cache/dl
|
path: /mnt/cache/dl
|
||||||
key: haos-dl
|
key: haos-dl-${{ matrix.board.id }}-${{ hashFiles('/mnt/cache/dl/download-files.txt') }}
|
||||||
|
restore-keys: |
|
||||||
|
haos-dl-${{ matrix.board.id }}
|
||||||
|
haos-dl
|
||||||
|
|
||||||
- name: Cache object files
|
- name: Cache object files
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: /mnt/cache/cc
|
path: /mnt/cache/cc
|
||||||
key: haos-cc-${{ matrix.board.architecture }}
|
key: haos-cc-${{ matrix.board.architecture }}-${{ github.run_id }}
|
||||||
|
restore-keys: |
|
||||||
|
haos-cc-${{ matrix.board.architecture }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@ -134,6 +139,10 @@ jobs:
|
|||||||
${{ needs.prepare.outputs.build_container_image }} \
|
${{ needs.prepare.outputs.build_container_image }} \
|
||||||
make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
|
||||||
|
|
||||||
|
- name: List downloads
|
||||||
|
run: |
|
||||||
|
find /mnt/cache/dl > /mnt/cache/dl/download-files.txt
|
||||||
|
|
||||||
- name: Upload images
|
- name: Upload images
|
||||||
uses: burnett01/rsync-deployments@5.2
|
uses: burnett01/rsync-deployments@5.2
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user