diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 927c660..e468e23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: with: source-dir: test build-dir: output - run_test: true + run-test: true - name: Check if the default build directory does not exist run: test ! -d build && test ! -d test/build @@ -51,14 +51,11 @@ jobs: with: source-dir: test targets: test_c test_cpp + run-test: true c-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} cxx-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} args: -D CHECK_SURPASS_WARNING=ON - - - name: Run the build results - run: | - ${{ matrix.compiler == 'msvc' && 'test\build\Debug\test_c.exe' || 'test/build/test_c' }} - ${{ matrix.compiler == 'msvc' && 'test\build\Debug\test_cpp.exe' || 'test/build/test_cpp' }} + test-args: -C test specified-compiler-usage: runs-on: ${{ matrix.os }}-latest @@ -74,13 +71,12 @@ jobs: with: source-dir: test targets: test_c test_cpp + run-test: true generator: Ninja c-compiler: clang cxx-compiler: clang++ args: -D CHECK_USING_CLANG=ON - - - name: Run the build results - run: test/build/test_c && test/build/test_cpp + test-args: -C test specified-generator-usage: runs-on: ${{ matrix.os }}-latest diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c031db3..93afcfd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -28,4 +28,5 @@ foreach(LANG ${LANGS}) $<$:CHECK_USING_CLANG> $<$:CHECK_SURPASS_WARNING> ) + add_test(NAME test_${LANG} CONFIGURATIONS test COMMAND $) endforeach()