mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-01 19:40:49 +00:00
feat: add the run-build input
This commit is contained in:
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -19,6 +19,8 @@ jobs:
|
||||
|
||||
- name: Use this action
|
||||
uses: ./
|
||||
with:
|
||||
run-build: true
|
||||
|
||||
- name: Run the build result
|
||||
run: ${{ matrix.os == 'windows' && 'build\Debug\hello_world.exe' || 'build/hello_world' }}
|
||||
@@ -34,6 +36,7 @@ jobs:
|
||||
with:
|
||||
source-dir: test
|
||||
build-dir: output
|
||||
run-build: true
|
||||
run-test: true
|
||||
test-args: -R hello_world
|
||||
|
||||
@@ -54,10 +57,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
|
||||
run-build: true
|
||||
run-test: true
|
||||
test-args: -R test ${{ matrix.compiler == 'msvc' && '-C Debug' || '' }}
|
||||
|
||||
specified-compiler-usage:
|
||||
@@ -74,11 +78,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
|
||||
run-build: true
|
||||
run-test: true
|
||||
test-args: -R test
|
||||
|
||||
specified-generator-usage:
|
||||
@@ -94,6 +99,7 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
run-test: true
|
||||
generator: Ninja
|
||||
run-build: true
|
||||
run-test: true
|
||||
test-args: -R hello_world
|
||||
|
||||
Reference in New Issue
Block a user