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:
parent
830e167027
commit
88ae92baa0
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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' }}
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in New Issue