-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f6113a
commit 432ba42
Showing
2 changed files
with
84 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Parse CMAKE preset targets | ||
description: Parse targets from CMakePresets.json | ||
|
||
inputs: | ||
name: | ||
description: name of the preset target | ||
required: true | ||
outputs: | ||
targets: | ||
description: a list of valid targets | ||
value: ${{ steps.get-targets.outputs.targets }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install jq | ||
shell: bash | ||
run: | | ||
sudo apt-get install jq | ||
- id: get-targets | ||
run: | | ||
targets=$(jq '.buildPresets[] | select(.name=="${{ inputs.name }}") | .targets' CMakePresets.json) | ||
eho targets=$targets >> "$GITHUB_OUTPUT" | ||
shell: bash | ||
working-directory: ${{ env.DEFAULT_DIRECTORY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters