Skip to content

Commit 161d4a4

Browse files
Enable cmake workflow to build a specified target (#1533)
* Update action.yml * Update build_and_test_provisioned.yml
1 parent b1baead commit 161d4a4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/actions/build/action.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ inputs:
1111
required: false
1212
default: ""
1313
description: "extra compile flags will be added to the end of C_FLAGS and CXX_FLAGS"
14+
ninja_target:
15+
required: false
16+
type: string
1417

1518
runs:
1619
using: "composite"
@@ -59,7 +62,7 @@ runs:
5962
export CCACHE_SLOPPINESS=locale
6063
export CCACHE_MAXSIZE=50G
6164
cd ../build
62-
ninja
65+
ninja ${{ inputs.ninja_target }}
6366
ccache -s
6467
df -h
6568
- name: report Build failed

.github/workflows/build_and_test_provisioned.yml

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
checkout_ref:
2828
required: false
2929
type: string
30+
ninja_target:
31+
required: false
32+
type: string
3033
workflow_dispatch:
3134
inputs:
3235
runner_label:
@@ -53,6 +56,9 @@ on:
5356
checkout_ref:
5457
required: false
5558
type: string
59+
ninja_target:
60+
required: false
61+
type: string
5662

5763
jobs:
5864
main:
@@ -70,6 +76,7 @@ jobs:
7076
sanitizer: ${{ inputs.sanitizer }}
7177
ccache_remote_path: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}}
7278
extra_compile_flags: ${{ inputs.extra_compile_flags }}
79+
ninja_target: ${{ inputs.ninja_target }}
7380
- name: Run tests
7481
uses: ./.github/actions/test
7582
with:

0 commit comments

Comments
 (0)