From f4c14b8b0bb7a7abc750a3b6063a710f6a317270 Mon Sep 17 00:00:00 2001 From: Yury Bayda Date: Mon, 28 Apr 2025 23:02:17 -0700 Subject: [PATCH] Test on all OSes --- .github/workflows/main.yml | 5 ++++- CMakeLists.txt | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f84ced3..0647531 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,10 @@ jobs: run: make format-check test: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index b22e500..8d7097b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,11 +26,13 @@ foreach(test ${tests}) gtest_discover_tests(${name}) endforeach() -add_custom_target( - copy-compile-commands ALL - ${CMAKE_COMMAND} - -E - copy_if_different - ${CMAKE_BINARY_DIR}/compile_commands.json - ${CMAKE_CURRENT_LIST_DIR} -) +if(UNIX) + add_custom_target( + copy-compile-commands ALL + ${CMAKE_COMMAND} + -E + copy_if_different + ${CMAKE_BINARY_DIR}/compile_commands.json + ${CMAKE_CURRENT_LIST_DIR} + ) +endif()