diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 750cc6d26..ac82758ee 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -95,10 +95,25 @@ jobs: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages key: ${{ steps.restore-depcache.outputs.cache-primary-key }} + # Cache assets downloading + - name: Restore cached assets + id: restore-assets + uses: actions/cache/restore@v3 + with: + path: assets + key: assets-${{ hashFiles('assets/examples_version.txt', 'assets/unittests_version.txt') }} + # Build the engine - name: Build Nazara run: xmake --yes + - name: Save downloaded assets + if: ${{ !steps.restore-assets.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: assets + key: ${{ steps.restore-assets.outputs.cache-primary-key }} + # Run unit tests to generate coverage reports - name: Run unit tests and generate coverage output (Linux) if: runner.os == 'Linux' diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index c1a13fc99..04fa083c1 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -87,10 +87,25 @@ jobs: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages key: ${{ steps.restore-depcache.outputs.cache-primary-key }} + # Cache assets downloading + - name: Restore cached assets + id: restore-assets + uses: actions/cache/restore@v3 + with: + path: assets + key: assets-${{ hashFiles('assets/examples_version.txt', 'assets/unittests_version.txt') }} + # Build the engine - name: Build Nazara run: xmake --yes + - name: Save downloaded assets + if: ${{ !steps.restore-assets.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: assets + key: ${{ steps.restore-assets.outputs.cache-primary-key }} + # Run unit tests - name: Run unit tests if: matrix.confs.mode != 'releasedbg' diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index c5dc55d3d..707901061 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -81,10 +81,25 @@ jobs: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages key: ${{ steps.restore-depcache.outputs.cache-primary-key }} + # Cache assets downloading + - name: Restore cached assets + id: restore-assets + uses: actions/cache/restore@v3 + with: + path: assets + key: assets-${{ hashFiles('assets/examples_version.txt', 'assets/unittests_version.txt') }} + # Build the engine - name: Build Nazara run: xmake --yes + - name: Save downloaded assets + if: ${{ !steps.restore-assets.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: assets + key: ${{ steps.restore-assets.outputs.cache-primary-key }} + # Run unit tests - name: Run unit tests if: matrix.confs.mode != 'releasedbg' diff --git a/.github/workflows/msys2-build.yml b/.github/workflows/msys2-build.yml index cce6d1d2f..efb3da08b 100644 --- a/.github/workflows/msys2-build.yml +++ b/.github/workflows/msys2-build.yml @@ -81,10 +81,25 @@ jobs: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages key: ${{ steps.restore-depcache.outputs.cache-primary-key }} + # Cache assets downloading + - name: Restore cached assets + id: restore-assets + uses: actions/cache/restore@v3 + with: + path: assets + key: assets-${{ hashFiles('assets/examples_version.txt', 'assets/unittests_version.txt') }} + # Build the engine - name: Build Nazara run: xmake --yes + - name: Save downloaded assets + if: ${{ !steps.restore-assets.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: assets + key: ${{ steps.restore-assets.outputs.cache-primary-key }} + # Run unit tests - name: Run unit tests if: matrix.mode != 'releasedbg' diff --git a/.github/workflows/wasm-build.yml b/.github/workflows/wasm-build.yml index ebc3268ea..1b3c11ca9 100644 --- a/.github/workflows/wasm-build.yml +++ b/.github/workflows/wasm-build.yml @@ -82,10 +82,25 @@ jobs: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages key: ${{ steps.restore-depcache.outputs.cache-primary-key }} + # Cache assets downloading + - name: Restore cached assets + id: restore-assets + uses: actions/cache/restore@v3 + with: + path: assets + key: assets-${{ hashFiles('assets/examples_version.txt', 'assets/unittests_version.txt') }} + # Build the engine - name: Build Nazara run: xmake --yes + - name: Save downloaded assets + if: ${{ !steps.restore-assets.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: assets + key: ${{ steps.restore-assets.outputs.cache-primary-key }} + # Install the result files - name: Install Nazara if: ${{ (github.ref == 'refs/heads/main') && github.event_name == 'push' }} diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 9a42882b8..ed04c1ddc 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -76,10 +76,25 @@ jobs: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages key: ${{ steps.restore-depcache.outputs.cache-primary-key }} + # Cache assets downloading + - name: Restore cached assets + id: restore-assets + uses: actions/cache/restore@v3 + with: + path: assets + key: assets-${{ hashFiles('assets/examples_version.txt', 'assets/unittests_version.txt') }} + # Build the engine - name: Build Nazara run: xmake --yes + - name: Save downloaded assets + if: ${{ !steps.restore-assets.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: assets + key: ${{ steps.restore-assets.outputs.cache-primary-key }} + # Run unit tests - name: Run unit tests if: matrix.mode != 'releasedbg'