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: on:
workflow_run: workflow_run:
workflows: [tests] workflows: [tests]
branches: [main]
types: [completed] types: [completed]
workflow_dispatch:
push: push:
paths: paths:
- 'protocols/**' - 'protocols/**'
branches: [ "main" ] branches: [main]
pull_request: pull_request:
paths: paths:
- 'protocols/**' - 'protocols/**'
branches: [ "main" ] branches: [main]
env: env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

View File

@ -6,13 +6,14 @@ on:
- 'src/**' - 'src/**'
- 'CMakeModules/**' - 'CMakeModules/**'
- CMakeLists.txt - CMakeLists.txt
branches: [ "main" ] branches: [main]
workflow_dispatch:
pull_request: pull_request:
paths: paths:
- 'src/**' - 'src/**'
- 'CMakeModules/**' - 'CMakeModules/**'
- CMakeLists.txt - CMakeLists.txt
branches: [ "main" ] branches: [main]
env: env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # 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/SPIRV-Cross-WallpaperEngine spirv-cross)
add_subdirectory(src/External/kissfft kissfft) add_subdirectory(src/External/kissfft kissfft)
add_subdirectory(src/External/argparse argparse) 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 # try to enable wayland builds when possible
pkg_check_modules(WAYLAND_SUPPORT wayland-cursor wayland-protocols egl wayland-egl) pkg_check_modules(WAYLAND_SUPPORT wayland-cursor wayland-protocols egl wayland-egl)