diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 24779e9..f6663af 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,11 @@ on: jobs: test-project: name: Test Project - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-14, windows-2022] steps: - name: Checkout Project uses: actions/checkout@v4.2.0 @@ -21,4 +25,5 @@ jobs: - name: Test Project uses: threeal/ctest-action@v1.1.0 with: + build-config: Debug verbose: true diff --git a/test/test_build.cmake b/test/test_build.cmake index 760345d..f0510bd 100644 --- a/test/test_build.cmake +++ b/test/test_build.cmake @@ -44,8 +44,13 @@ section("it should build a package") endsection() section("it should build the correct targets") - assert(EXISTS .cdeps/pkg/build/main) - assert_execute_process(.cdeps/pkg/build/main OUTPUT "Hello World!") + if(EXISTS .cdeps/pkg/build/main) + assert_execute_process(.cdeps/pkg/build/main OUTPUT "Hello World!") + elseif(EXISTS .cdeps/pkg/build/main.exe) + assert_execute_process(.cdeps/pkg/build/main.exe OUTPUT "Hello World!") + else() + fail("expected path" .cdeps/pkg/build/main "to exist") + endif() endsection() endsection() diff --git a/test/test_install.cmake b/test/test_install.cmake index 8b2513b..63be9aa 100644 --- a/test/test_install.cmake +++ b/test/test_install.cmake @@ -48,7 +48,14 @@ section("it should install a package") endsection() section("it should install the correct targets") - assert_execute_process(.cdeps/pkg/install/bin/main OUTPUT "Hello World!") + if(EXISTS .cdeps/pkg/install/bin/main) + assert_execute_process(.cdeps/pkg/install/bin/main OUTPUT "Hello World!") + elseif(EXISTS .cdeps/pkg/install/bin/main.exe) + assert_execute_process( + .cdeps/pkg/install/bin/main.exe OUTPUT "Hello World!") + else() + fail("expected path" .cdeps/pkg/install/bin/main "to exist") + endif() endsection() endsection() diff --git a/test/test_integration.cmake b/test/test_integration.cmake index 218ff51..9825eb2 100644 --- a/test/test_integration.cmake +++ b/test/test_integration.cmake @@ -13,8 +13,8 @@ endsection() section("it should fail to configure the build due to missing dependencies") assert_execute_process( - COMMAND "${CMAKE_COMMAND}" -B project/build project - ERROR "Could not find a package configuration file provided by \"MyFibonacci\"") + COMMAND "${CMAKE_COMMAND}" -G "Unix Makefiles" -S project -B project/build + ERROR "Could not find a package configuration file") endsection() section("it should regenerate the source code of the test project")