diff --git a/.github/workflows/sub_buildPixi.yml b/.github/workflows/sub_buildPixi.yml index 5423a560b7..056c46853a 100644 --- a/.github/workflows/sub_buildPixi.yml +++ b/.github/workflows/sub_buildPixi.yml @@ -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: diff --git a/.github/workflows/sub_buildUbuntu.yml b/.github/workflows/sub_buildUbuntu.yml index b3523dfc6a..19c2e9229c 100644 --- a/.github/workflows/sub_buildUbuntu.yml +++ b/.github/workflows/sub_buildUbuntu.yml @@ -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 diff --git a/.github/workflows/sub_buildWindows.yml b/.github/workflows/sub_buildWindows.yml index 00ea2d935b..2f7c672ce9 100644 --- a/.github/workflows/sub_buildWindows.yml +++ b/.github/workflows/sub_buildWindows.yml @@ -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