From 89690fb71011ecb8b18cc8f1c7b466fe81d80b80 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 25 Oct 2023 20:24:25 +0200 Subject: [PATCH] CI: Add support for sanitizers --- .github/workflows/linux-build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index e63eecd09..7e859c32a 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -23,7 +23,13 @@ jobs: matrix: os: [ubuntu-latest] arch: [x86_64] - mode: [asan, tsan, debug, releasedbg] + mode: [debug, releasedbg] + confs: + - { mode: debug } + - { mode: debug, config: --asan=y } + - { mode: debug, config: --lsan=y } + - { mode: debug, config: --msan=y } + - { mode: releasedbg } runs-on: ${{ matrix.os }} if: "!contains(github.event.head_commit.message, 'ci skip')" @@ -67,11 +73,11 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: Linux-${{ matrix.arch }}-${{ matrix.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 }} # 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 @@ -79,12 +85,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 }} --ccache=n --ffmpeg=n --shadernodes=y --tests=y --yes # Install the result files - name: Install Nazara @@ -93,5 +99,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