mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-19 02:11:21 +00:00
34 lines
885 B
YAML
34 lines
885 B
YAML
name: CMake Action
|
|
description: Configure and build CMake project
|
|
author: Alfi Maulana
|
|
branding:
|
|
color: gray-dark
|
|
icon: terminal
|
|
inputs:
|
|
source-dir:
|
|
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 ${{ 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
|
|
run: cmake ${{ env.CMAKE_CONFIGURE_ARGS }}
|
|
|
|
- name: Build targets
|
|
shell: bash
|
|
run: cmake ${{ env.CMAKE_BUILD_ARGS }}
|