From 110896fb802fe86056a372d5483acdfa9b81043f Mon Sep 17 00:00:00 2001 From: emild Date: Sun, 26 Jan 2025 17:37:05 +0100 Subject: [PATCH] Setup valgrind and parallel builds --- .github/workflows/cmake-build.yml | 2 +- .github/workflows/cmake-test.yml | 6 +++--- .github/workflows/cmake-valgrind.yml | 3 ++- CMakePresets.json | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-build.yml b/.github/workflows/cmake-build.yml index f37125da..11637aea 100644 --- a/.github/workflows/cmake-build.yml +++ b/.github/workflows/cmake-build.yml @@ -85,5 +85,5 @@ jobs: CXX: ${{ matrix.compilercxx }} CFLAGS: ${{ matrix.cflags }} CXXFLAGS: ${{ matrix.cxxflags }} - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc || echo $NUMBER_OF_PROCESSORS) \ No newline at end of file diff --git a/.github/workflows/cmake-test.yml b/.github/workflows/cmake-test.yml index b2071dde..9922b899 100644 --- a/.github/workflows/cmake-test.yml +++ b/.github/workflows/cmake-test.yml @@ -39,8 +39,8 @@ jobs: os: windows-latest compiler: msvc compilercxx: msvc - cflags: "/fsanitize=address" - cxxflags: "/fsanitize=address" + cflags: "" + cxxflags: "" - name: MacOS ARM GCC os: macos-latest compiler: gcc-13 @@ -83,7 +83,7 @@ jobs: CXX: ${{ matrix.compilercxx }} CFLAGS: ${{ matrix.cflags }} CXXFLAGS: ${{ matrix.cxxflags }} - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc || echo $NUMBER_OF_PROCESSORS) # On windows we need to copy the test files differently as it generates sub-folders # for the copied test files diff --git a/.github/workflows/cmake-valgrind.yml b/.github/workflows/cmake-valgrind.yml index 3ed6e336..2a188ed8 100644 --- a/.github/workflows/cmake-valgrind.yml +++ b/.github/workflows/cmake-valgrind.yml @@ -5,6 +5,7 @@ on: push: branches: - dev + - 57-add-support-for-adjustment-layers pull_request: branches: - master @@ -53,7 +54,7 @@ jobs: env: CC: ${{ matrix.compiler }} CXX: ${{ matrix.compilercxx }} - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc || echo $NUMBER_OF_PROCESSORS) - name: Run Valgrind if: matrix.os == 'ubuntu-24.04' diff --git a/CMakePresets.json b/CMakePresets.json index 5a320508..b91fba47 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -29,6 +29,20 @@ "CMAKE_BUILD_TYPE": "Debug" } }, + { + "name": "x64-debug-asan", + "displayName": "x64 Debug with ASan", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_C_FLAGS": "/fsanitize=address", + "CMAKE_CXX_FLAGS": "/fsanitize=address", + } + }, { "name": "x64-release", "displayName": "x64 Release",