Skip to content

Commit

Permalink
Use actions/cache/restore for read-only caches
Browse files Browse the repository at this point in the history
Using the restore action avoids the post step that tries to upload new files to the cache at the end of the job, which would not make sense in theses cases.
  • Loading branch information
jonathanperret committed Jul 12, 2024
1 parent c701f4c commit 2f47e49
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/build-multi-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,55 +190,55 @@ jobs:
python -m pip install -r windows-build\windows_build_requirements.txt
- name: Restore cached firmware
id: firmware-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/resources/base/ayab/firmware/*.hex
key: firmware-${{ steps.vars.outputs.manifest }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore cached gui files (1)
id: gui1-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/*_gui.py
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore cached gui files (2)
id: gui2-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/engine/*_gui.py
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore cached logo
id: logo-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/ayab_logo_rc.py
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore cached graphics
id: e-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/engine/*_rc.py
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore cached translation files
id: qm-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/resources/base/ayab/translations/*.qm
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore cached `base.json` file
id: base-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/build/settings/base.json
key: base-${{ steps.vars.outputs.tag }}
Expand Down Expand Up @@ -330,49 +330,49 @@ jobs:
python -m pip install --no-binary charset_normalizer -r requirements.build.txt
- name: Restore cached firmware
id: firmware-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/resources/base/ayab/firmware/*.hex
key: firmware-${{ steps.vars.outputs.manifest }}
fail-on-cache-miss: true
- name: Restore cached gui files (1)
id: gui1-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/*_gui.py
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }}
fail-on-cache-miss: true
- name: Restore cached gui files (2)
id: gui2-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/engine/*_gui.py
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }}
fail-on-cache-miss: true
- name: Restore cached logo
id: logo-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/ayab_logo_rc.py
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }}
fail-on-cache-miss: true
- name: Restore cached graphics
id: e-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/engine/*_rc.py
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }}
fail-on-cache-miss: true
- name: Restore cached translation files
id: qm-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/resources/base/ayab/translations/*.qm
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }}
fail-on-cache-miss: true
- name: Restore cached `base.json` file
id: base-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/build/settings/base.json
key: base-${{ steps.vars.outputs.tag }}
Expand Down Expand Up @@ -460,49 +460,49 @@ jobs:
echo "opt/${{steps.vars.outputs.python}}/bin" >> $GITHUB_PATH
- name: Restore cached firmware
id: firmware-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/resources/base/ayab/firmware/*.hex
key: firmware-${{ steps.vars.outputs.manifest }}
fail-on-cache-miss: true
- name: Restore cached gui files (1)
id: gui1-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/*_gui.py
key: gui1-${{ hashFiles('src/main/python/main/ayab/*_gui.ui') }}
fail-on-cache-miss: true
- name: Restore cached gui files (2)
id: gui2-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/engine/*_gui.py
key: gui2-${{ hashFiles('src/main/python/main/ayab/engine/*_gui.ui') }}
fail-on-cache-miss: true
- name: Restore cached logo
id: logo-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/ayab_logo_rc.py
key: logo-${{ hashFiles('src/main/python/main/ayab/ayab_logo_rc.qrc') }}
fail-on-cache-miss: true
- name: Restore cached graphics
id: e-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/python/main/ayab/engine/*_rc.py
key: e-${{ hashFiles('src/main/python/main/ayab/engine/*_rc.qrc') }}
fail-on-cache-miss: true
- name: Restore cached translation files
id: qm-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/main/resources/base/ayab/translations/*.qm
key: qm-${{ hashFiles('src/main/resources/base/ayab/translations/ayab-translation-master.tsv') }}
fail-on-cache-miss: true
- name: Restore cached `base.json` file
id: base-cache
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
path: src/build/settings/base.json
key: base-${{ steps.vars.outputs.tag }}
Expand Down

0 comments on commit 2f47e49

Please sign in to comment.