CI: Add sanitizers to macOS build

This commit is contained in:
SirLynix 2023-11-29 11:41:22 +01:00
parent 32d227628c
commit ad81b8642e
2 changed files with 13 additions and 7 deletions

View File

@ -89,7 +89,7 @@ jobs:
# Setup installation configuration
- name: Configure xmake for installation
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.confs.mode }} --ccache=n --ffmpeg=n --shadernodes=y --tests=y --yes
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.confs.mode }} ${{ matrix.confs.config }} --ccache=n --ffmpeg=n --shadernodes=y --tests=y --yes
# Install the result files
- name: Install Nazara

View File

@ -19,10 +19,16 @@ on:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
arch: [x86_64]
mode: [debug, releasedbg]
confs:
- { mode: debug }
- { mode: debug, config: --asan=y }
- { mode: debug, config: --lsan=y }
- { mode: debug, config: --tsan=y }
- { mode: releasedbg }
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
@ -60,11 +66,11 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: macOS-${{ matrix.arch }}-${{ matrix.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 }}
# Setup compilation mode and install project 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.confs.mode }} ${{ matrix.confs.config }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes
# Build the engine
- name: Build Nazara
@ -72,12 +78,12 @@ jobs:
# Run unit tests
- name: Run unit tests
if: matrix.mode != 'releasedbg'
if: matrix.confs.mode != 'releasedbg'
run: xmake run UnitTests
# Setup installation configuration
- name: Configure xmake for installation
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=n --shadernodes=y --tests=y --yes
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.confs.mode }} ${{ matrix.confs.config }} --ccache=n --ffmpeg=n --shadernodes=y --tests=y --yes
# Install the result files
- name: Install Nazara
@ -86,5 +92,5 @@ jobs:
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: nazaraengine-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.mode }}
name: nazaraengine-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.confs.mode }}
path: package