mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 11:01:20 +00:00
feat: auto enable run-build
if run-test
is enabled
This commit is contained in:
parent
baf303f121
commit
d0fef383d5
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@ -82,7 +82,6 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
run-build: true
|
||||
run-test: true
|
||||
test-args: -R hello_world
|
||||
|
||||
|
@ -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 }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user