feat: add the run-build input

This commit is contained in:
Alfi Maulana
2023-06-29 19:17:47 +07:00
parent be11a3a3dd
commit 3430da8dad
3 changed files with 61 additions and 38 deletions

View File

@@ -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