CI: address actions/cache warning and always upload cache.

This commit is contained in:
Jacob Oursland
2025-08-01 14:44:37 -07:00
parent 79e6d8f016
commit cca0c964e5
3 changed files with 32 additions and 7 deletions

View File

@@ -118,6 +118,8 @@ jobs:
cache: false
- name: Restore Compiler Cache
id: cache-restore
if: always()
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ env.CCACHE_DIR }}
@@ -200,6 +202,7 @@ jobs:
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:

View File

@@ -107,9 +107,10 @@ jobs:
compiler: ${{ env.CXX }}
qt_major_version: 5
- name: Restore Compiler Cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache-restore
if: always()
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
@@ -190,6 +191,15 @@ jobs:
testCommand: xvfb-run FreeCAD -t 0
logFile: ${{ env.logdir }}TestGUIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

View File

@@ -54,6 +54,7 @@ jobs:
## Have to use C:\ because not enough space on workspace drive
builddir: C:/FC/build/release/
libpackdir: C:/FC/libpack/
cacheKey: Windows
ccachebindir: C:/FC/ccache/
logdir: C:/logs/
reportdir: C:/report/
@@ -90,14 +91,16 @@ jobs:
with:
libpackdir: ${{ env.libpackdir }}
- name: Restore compiler cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache-restore
if: always()
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-Windows-${{ github.ref }}-${{ github.run_id }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-Windows-${{ github.ref }}-
FC-Windows-
FC-${{ env.cacheKey }}-${{ github.ref }}-
FC-${{ env.cacheKey }}-
- name: Print Ccache statistics before build, reset stats and print config
run: |
. $env:ccachebindir\ccache -s
@@ -136,6 +139,15 @@ jobs:
- name: FreeCAD CLI tests
run: |
. ${{ env.builddir }}\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}\integrationTests.log
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2