-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
40 lines (40 loc) · 1.52 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: "Modern CMake Buildsystem"
description: "Builds, tests, and optionally installs a modern CMake project."
inputs:
path-to-source:
description: "The top-level directory containing source files provided by the project."
required: false
default: "${{ github.workspace }}"
path-to-build:
description: "The top-level directory in which buildsystem files and build output artifacts are to be stored."
required: false
default: "${{ github.workspace }}/build"
generate-options:
description: "Options to generate a project buildsystem other than `-S` and `-B`."
required: false
build-options:
description: "Options to build a project other than `--build`."
required: false
test-options:
description: "Options to test a project."
required: false
install:
description: "Set to `true` to install the project. Requires CMake 3.15."
required: false
install-options:
description: "Options to install a project other than `--install`."
required: false
runs:
using: "composite"
steps:
- shell: bash
run: |
cmake ${{ inputs.generate-options }} -S ${{ inputs.path-to-source }} -B ${{ inputs.path-to-build }}
cmake --build ${{ inputs.path-to-build }} ${{ inputs.build-options }}
cmake -E chdir ${{ inputs.path-to-build }} ctest ${{ inputs.test-options }}
if [[ "${{ inputs.install }}" == true ]]; then
cmake --install ${{ inputs.path-to-build }} ${{ inputs.install-options }}
fi
branding:
icon: 'align-justify'
color: 'white'