mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-20 02:31:20 +00:00
add source-dir
input and a step to process inputs
This commit is contained in:
parent
c1a039da72
commit
9bc3bd6ba9
13
action.yml
13
action.yml
@ -4,12 +4,23 @@ author: Alfi Maulana
|
|||||||
branding:
|
branding:
|
||||||
color: gray-dark
|
color: gray-dark
|
||||||
icon: terminal
|
icon: terminal
|
||||||
|
inputs:
|
||||||
|
source-dir:
|
||||||
|
description: The source directory of CMake project
|
||||||
|
required: false
|
||||||
|
default: .
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
- name: Process inputs
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
CONFIGURE_ARGS="'${{ inputs.source-dir }}' -B build"
|
||||||
|
echo "CMAKE_CONFIGURE_ARGS=$CONFIGURE_ARGS" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake . -B build
|
run: cmake ${{ env.CMAKE_CONFIGURE_ARGS }}
|
||||||
|
|
||||||
- name: Build targets
|
- name: Build targets
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
Reference in New Issue
Block a user