chore: only compile Catch2 if a testing build is requested and run cmake on any branch after tests

This commit is contained in:
Almamu 2025-05-17 05:20:04 +02:00
parent 9f0bdd50e2
commit 8bfbf8ecf1
3 changed files with 9 additions and 7 deletions

View File

@ -3,16 +3,16 @@ name: CMake
on:
workflow_run:
workflows: [tests]
branches: [main]
types: [completed]
workflow_dispatch:
push:
paths:
- 'protocols/**'
branches: [ "main" ]
branches: [main]
pull_request:
paths:
- 'protocols/**'
branches: [ "main" ]
branches: [main]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

View File

@ -6,13 +6,14 @@ on:
- 'src/**'
- 'CMakeModules/**'
- CMakeLists.txt
branches: [ "main" ]
branches: [main]
workflow_dispatch:
pull_request:
paths:
- 'src/**'
- 'CMakeModules/**'
- CMakeLists.txt
branches: [ "main" ]
branches: [main]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

View File

@ -116,8 +116,9 @@ add_subdirectory(src/External/glslang-WallpaperEngine glslang)
add_subdirectory(src/External/SPIRV-Cross-WallpaperEngine spirv-cross)
add_subdirectory(src/External/kissfft kissfft)
add_subdirectory(src/External/argparse argparse)
add_subdirectory(src/External/Catch2)
if(BUILD_TESTING)
add_subdirectory(src/External/Catch2)
endif()
# try to enable wayland builds when possible
pkg_check_modules(WAYLAND_SUPPORT wayland-cursor wayland-protocols egl wayland-egl)