feat: auto enable run-build if run-test is enabled

This commit is contained in:
Alfi Maulana 2023-06-29 23:17:28 +07:00
parent baf303f121
commit d0fef383d5
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
2 changed files with 2 additions and 3 deletions

View File

@ -82,7 +82,6 @@ jobs:
uses: ./
with:
source-dir: test
run-build: true
run-test: true
test-args: -R hello_world

View File

@ -83,7 +83,7 @@ runs:
fi
echo "cmake_args=${ARGS//[$'\t\r\n']}" >> $GITHUB_OUTPUT
if [ '${{ inputs.run-build }}' == 'true' ]; then
if [ '${{ inputs.run-build }}' == 'true' ] || [ '${{ inputs.run-test }}' == 'true' ]; then
BUILD_ARGS="--build '$BUILD_DIR'"
if [ -n '${{ inputs.build-args }}' ]; then
BUILD_ARGS="$BUILD_ARGS ${{ inputs.build-args }}"
@ -114,7 +114,7 @@ runs:
run: cmake ${{ steps.process_inputs.outputs.cmake_args }}
- name: Build targets
if: inputs.run-build != 'false'
if: inputs.run-build != 'false' || inputs.run-test != 'false'
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: cmake ${{ steps.process_inputs.outputs.cmake_build_args }}