replace test configuration with regex match

This commit is contained in:
Alfi Maulana 2023-01-22 13:07:56 +07:00
parent c2bf81f4d3
commit 354c02b686
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
2 changed files with 6 additions and 4 deletions

View File

@ -33,6 +33,7 @@ jobs:
source-dir: test
build-dir: output
run-test: true
test-args: -R hello_world
- name: Check if the default build directory does not exist
run: test ! -d build && test ! -d test/build
@ -55,7 +56,7 @@ jobs:
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
test-args: -C test -E hello_world
test-args: -R test
specified-compiler-usage:
runs-on: ${{ matrix.os }}-latest
@ -76,7 +77,7 @@ jobs:
c-compiler: clang
cxx-compiler: clang++
args: -D CHECK_USING_CLANG=ON
test-args: -C test -E hello_world
test-args: -R test
specified-generator-usage:
runs-on: ${{ matrix.os }}-latest
@ -91,5 +92,6 @@ jobs:
uses: ./
with:
source-dir: test
generator: Ninja
run-test: true
generator: Ninja
test-args: -R hello_world

View File

@ -28,5 +28,5 @@ foreach(LANG ${LANGS})
$<$<BOOL:${CHECK_USING_CLANG}>:CHECK_USING_CLANG>
$<$<BOOL:${CHECK_SURPASS_WARNING}>:CHECK_SURPASS_WARNING>
)
add_test(NAME test_${LANG} CONFIGURATIONS test COMMAND $<TARGET_FILE:test_${LANG}>)
add_test(NAME test_${LANG} COMMAND $<TARGET_FILE:test_${LANG}>)
endforeach()