mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-01 19:40:49 +00:00
add support to run test_c and test_cpp targets as a CMake test
This commit is contained in:
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user