mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 11:01:20 +00:00
add build-dir
input
This commit is contained in:
parent
9a1f68f162
commit
a0fbcc2eb0
10
action.yml
10
action.yml
@ -9,14 +9,20 @@ inputs:
|
||||
description: The source directory of CMake project
|
||||
required: false
|
||||
default: .
|
||||
build-dir:
|
||||
description: The build directory of CMake project
|
||||
required: false
|
||||
default: build
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Process inputs
|
||||
shell: bash
|
||||
run: |
|
||||
CONFIGURE_ARGS="'${{ inputs.source-dir }}' -B build"
|
||||
CONFIGURE_ARGS="'${{ inputs.source-dir }}' -B '${{ inputs.build-dir }}'"
|
||||
BUILD_ARGS="--build '${{ inputs.build-dir }}'"
|
||||
echo "CMAKE_CONFIGURE_ARGS=$CONFIGURE_ARGS" >> $GITHUB_ENV
|
||||
echo "CMAKE_BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
@ -24,4 +30,4 @@ runs:
|
||||
|
||||
- name: Build targets
|
||||
shell: bash
|
||||
run: cmake --build build
|
||||
run: cmake ${{ env.CMAKE_BUILD_ARGS }}
|
||||
|
Loading…
Reference in New Issue
Block a user