CI: Cache asset downloading
Assets are downloaded from a single server which doesn't have enough bandwidth for 20 concurrent downloads
This commit is contained in:
15
.github/workflows/coverage.yml
vendored
15
.github/workflows/coverage.yml
vendored
@@ -95,10 +95,25 @@ jobs:
|
|||||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
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
|
# Build the engine
|
||||||
- name: Build Nazara
|
- name: Build Nazara
|
||||||
run: xmake --yes
|
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
|
# Run unit tests to generate coverage reports
|
||||||
- name: Run unit tests and generate coverage output (Linux)
|
- name: Run unit tests and generate coverage output (Linux)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
|
|||||||
15
.github/workflows/linux-build.yml
vendored
15
.github/workflows/linux-build.yml
vendored
@@ -87,10 +87,25 @@ jobs:
|
|||||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
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
|
# Build the engine
|
||||||
- name: Build Nazara
|
- name: Build Nazara
|
||||||
run: xmake --yes
|
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
|
# Run unit tests
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
if: matrix.confs.mode != 'releasedbg'
|
if: matrix.confs.mode != 'releasedbg'
|
||||||
|
|||||||
15
.github/workflows/macos-build.yml
vendored
15
.github/workflows/macos-build.yml
vendored
@@ -81,10 +81,25 @@ jobs:
|
|||||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
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
|
# Build the engine
|
||||||
- name: Build Nazara
|
- name: Build Nazara
|
||||||
run: xmake --yes
|
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
|
# Run unit tests
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
if: matrix.confs.mode != 'releasedbg'
|
if: matrix.confs.mode != 'releasedbg'
|
||||||
|
|||||||
15
.github/workflows/msys2-build.yml
vendored
15
.github/workflows/msys2-build.yml
vendored
@@ -81,10 +81,25 @@ jobs:
|
|||||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
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
|
# Build the engine
|
||||||
- name: Build Nazara
|
- name: Build Nazara
|
||||||
run: xmake --yes
|
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
|
# Run unit tests
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
if: matrix.mode != 'releasedbg'
|
if: matrix.mode != 'releasedbg'
|
||||||
|
|||||||
15
.github/workflows/wasm-build.yml
vendored
15
.github/workflows/wasm-build.yml
vendored
@@ -82,10 +82,25 @@ jobs:
|
|||||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
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
|
# Build the engine
|
||||||
- name: Build Nazara
|
- name: Build Nazara
|
||||||
run: xmake --yes
|
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
|
# Install the result files
|
||||||
- name: Install Nazara
|
- name: Install Nazara
|
||||||
if: ${{ (github.ref == 'refs/heads/main') && github.event_name == 'push' }}
|
if: ${{ (github.ref == 'refs/heads/main') && github.event_name == 'push' }}
|
||||||
|
|||||||
15
.github/workflows/windows-build.yml
vendored
15
.github/workflows/windows-build.yml
vendored
@@ -76,10 +76,25 @@ jobs:
|
|||||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
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
|
# Build the engine
|
||||||
- name: Build Nazara
|
- name: Build Nazara
|
||||||
run: xmake --yes
|
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
|
# Run unit tests
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
if: matrix.mode != 'releasedbg'
|
if: matrix.mode != 'releasedbg'
|
||||||
|
|||||||
Reference in New Issue
Block a user