CI: Save dependencies cache even if compilation/tests fail
This commit is contained in:
parent
2125b80b8d
commit
1eb72af57e
|
|
@ -21,12 +21,12 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { name: "Windows x64", os: windows-latest, arch: x64 }
|
||||
- { name: "Ubuntu x86_64", os: ubuntu-latest, arch: x86_64 }
|
||||
- { name: "Windows", os: windows-latest, arch: x64 }
|
||||
- { name: "Ubuntu", os: ubuntu-latest, arch: x86_64 }
|
||||
|
||||
name: ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
if: "!contains(github.event.head_commit.message, 'coverage skip')"
|
||||
if: ${{ !contains(github.event.head_commit.message, 'coverage skip') }}
|
||||
|
||||
steps:
|
||||
- name: Get current date as package key
|
||||
|
|
@ -71,34 +71,30 @@ jobs:
|
|||
|
||||
# Fetch xmake dephash
|
||||
- name: Retrieve dependencies hash
|
||||
if: runner.os == 'Linux'
|
||||
id: dep_hash_linux
|
||||
id: dephash
|
||||
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Retrieve dependencies hash
|
||||
if: runner.os == 'Windows'
|
||||
id: dep_hash_windows
|
||||
run: echo "hash=$(xmake l utils.ci.packageskey)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
shell: bash
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
uses: actions/cache@v3
|
||||
- name: Restore cached xmake dependencies
|
||||
id: restore-depcache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: Linux-${{ matrix.config.arch }}-coverage-${{ steps.dep_hash_linux.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
||||
- name: Retrieve cached xmake dependencies (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages
|
||||
key: MSVC-${{ matrix.config.arch }}-coverage-${{ steps.dep_hash_windows.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
key: ${{ matrix.config.name}}-${{ matrix.config.arch }}-coverage-${{ steps.dephash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
||||
# Setup compilation mode and install project dependencies
|
||||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.config.arch }} --mode=coverage --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes
|
||||
|
||||
# Save dependencies
|
||||
- name: Save cached xmake dependencies
|
||||
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
run: xmake --yes
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- { mode: releasedbg }
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
|
||||
|
||||
steps:
|
||||
- name: Get current date as package key
|
||||
|
|
@ -68,8 +68,9 @@ jobs:
|
|||
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
uses: actions/cache@v3
|
||||
- name: Restore cached xmake dependencies
|
||||
id: restore-depcache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: Linux-${{ matrix.arch }}-${{ matrix.confs.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
|
@ -78,6 +79,14 @@ jobs:
|
|||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.confs.mode }} ${{ matrix.confs.config }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes
|
||||
|
||||
# Save dependencies
|
||||
- name: Save cached xmake dependencies
|
||||
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
run: xmake --yes
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- { mode: releasedbg }
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
|
||||
|
||||
steps:
|
||||
- name: Get current date as package key
|
||||
|
|
@ -62,8 +62,9 @@ jobs:
|
|||
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
uses: actions/cache@v3
|
||||
- name: Restore cached xmake dependencies
|
||||
id: restore-depcache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: macOS-${{ matrix.arch }}-${{ matrix.confs.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
|
@ -72,6 +73,14 @@ jobs:
|
|||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.confs.mode }} ${{ matrix.confs.config }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes
|
||||
|
||||
# Save dependencies
|
||||
- name: Save cached xmake dependencies
|
||||
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
run: xmake --yes
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
mode: [debug, releasedbg]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -62,8 +62,9 @@ jobs:
|
|||
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
uses: actions/cache@v3
|
||||
- name: Restore cached xmake dependencies
|
||||
id: restore-depcache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: MinGW-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
|
@ -72,6 +73,14 @@ jobs:
|
|||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes
|
||||
|
||||
# Save dependencies
|
||||
- name: Save cached xmake dependencies
|
||||
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
run: xmake --yes
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
mode: [debug, release]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
|
||||
|
||||
steps:
|
||||
- name: Get current date as package key
|
||||
|
|
@ -63,8 +63,9 @@ jobs:
|
|||
actions-cache-folder: emsdk-cache-${{ matrix.mode }}-${{ matrix.kind }}
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
uses: actions/cache@v3
|
||||
- name: Restore cached xmake dependencies
|
||||
id: restore-depcache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: Wasm-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
|
@ -73,6 +74,14 @@ jobs:
|
|||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --plat=wasm --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --assimp=n --embed_rendererbackends=y --embed_plugins=y --link_openal=y --ffmpeg=n --shadernodes=n --tests=y --yes
|
||||
|
||||
# Save dependencies
|
||||
- name: Save cached xmake dependencies
|
||||
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
run: xmake --yes
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
mode: [debug, releasedbg]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
|
||||
|
||||
steps:
|
||||
- name: Get current date as package key
|
||||
|
|
@ -57,8 +57,9 @@ jobs:
|
|||
run: echo "hash=$(xmake l utils.ci.packageskey)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
|
||||
# Cache xmake dependencies
|
||||
- name: Retrieve cached xmake dependencies
|
||||
uses: actions/cache@v3
|
||||
- name: Restore cached xmake dependencies
|
||||
id: restore-depcache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages
|
||||
key: MSVC-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
|
||||
|
|
@ -67,6 +68,14 @@ jobs:
|
|||
- name: Configure xmake and install dependencies
|
||||
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes
|
||||
|
||||
# Save dependencies
|
||||
- name: Save cached xmake dependencies
|
||||
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
|
||||
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
|
||||
|
||||
# Build the engine
|
||||
- name: Build Nazara
|
||||
run: xmake --yes
|
||||
|
|
|
|||
Loading…
Reference in New Issue