mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-08 18:21:20 +00:00
ci: utilize CTest Action (#262)
* ci: utilize CTest Action * ci: add test project step in other jobs
This commit is contained in:
parent
7619e111ea
commit
3fcdda0592
29
.github/workflows/test.yaml
vendored
29
.github/workflows/test.yaml
vendored
@ -75,7 +75,10 @@ jobs:
|
||||
uses: ./
|
||||
|
||||
- name: Test Project
|
||||
run: ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R hello_world ${{ matrix.os == 'windows' && '-C Debug' || '' }}
|
||||
uses: threeal/ctest-action@v1.0.0
|
||||
with:
|
||||
build-config: Debug
|
||||
tests-regex: hello_world
|
||||
|
||||
test-action-with-specified-dirs:
|
||||
name: Test Action With Specified Directories
|
||||
@ -102,7 +105,10 @@ jobs:
|
||||
run: test ! -e build && test ! -e test/build
|
||||
|
||||
- name: Test Project
|
||||
run: ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R hello_world
|
||||
uses: threeal/ctest-action@v1.0.0
|
||||
with:
|
||||
test-dir: ${{ steps.cmake-action.outputs.build-dir }}
|
||||
tests-regex: hello_world
|
||||
|
||||
test-action-without-run-build:
|
||||
name: Test Action Without Run Build
|
||||
@ -127,7 +133,9 @@ jobs:
|
||||
- name: Try to Test Project
|
||||
id: failed-step
|
||||
continue-on-error: true
|
||||
run: ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R hello_world
|
||||
uses: threeal/ctest-action@v1.0.0
|
||||
with:
|
||||
tests-regex: hello_world
|
||||
|
||||
- name: Previous Step Should Failed
|
||||
if: steps.failed-step.outcome == 'success'
|
||||
@ -150,7 +158,7 @@ jobs:
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Configure, Build, and Test Project
|
||||
- name: Configure and Build Project
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
@ -159,6 +167,12 @@ jobs:
|
||||
options: CHECK_SURPASS_WARNING=ON
|
||||
build-args: --target test_c --target test_cpp
|
||||
|
||||
- name: Test Project
|
||||
uses: threeal/ctest-action@v1.0.0
|
||||
with:
|
||||
build-config: Debug
|
||||
tests-regex: test
|
||||
|
||||
test-action-with-custom-tools:
|
||||
name: Test Action With Custom Tools
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
@ -179,7 +193,7 @@ jobs:
|
||||
- name: Setup Ninja
|
||||
uses: seanmiddleditch/gha-setup-ninja@v4
|
||||
|
||||
- name: Configure, Build, and Test Project
|
||||
- name: Configure and Build Project
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
@ -188,3 +202,8 @@ jobs:
|
||||
cxx-compiler: clang++
|
||||
options: CHECK_USING_CLANG=ON
|
||||
build-args: --target test_c --target test_cpp
|
||||
|
||||
- name: Test Project
|
||||
uses: threeal/ctest-action@v1.0.0
|
||||
with:
|
||||
tests-regex: test
|
||||
|
Loading…
Reference in New Issue
Block a user