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