Skip to content

Commit 2c00f69

Browse files
committed
add input parameter
1 parent 1fef726 commit 2c00f69

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/build-run-app.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
type: string
1515
required: false
1616
default: ''
17+
is_framework_app:
18+
description: Whether this is a framework app (TO/CI/SCH Lab, Sample App)
19+
type: boolean
20+
required: false
21+
default: false
1722

1823
# Force bash to apply pipefail option so pipeline failures aren't masked
1924
defaults:
@@ -45,11 +50,9 @@ jobs:
4550
steps:
4651
- name: Set up environment variables
4752
# Apps typically use lowercase targets and uppercase names, this logic is fragile but works
48-
# Mark the sample app/lib and lab apps as we don't need to add them to the build or startup file (they're already part of the bundle)
4953
run: |
5054
echo "APP_UPPER=$(echo ${{ inputs.app-name }} | sed 's/[a-z]/\U&/g')" >> $GITHUB_ENV
5155
echo "APP_LOWER=$(echo ${{ inputs.app-name }} | sed 's/[A-Z]/\L&/g')" >> $GITHUB_ENV
52-
echo "IS_SAMPLE_OR_LAB=$(echo ${{ inputs.app-name }} | grep -iqE 'sample|lab' && echo true || echo false)" >> $GITHUB_ENV
5356
5457
- name: Set up start string for verification
5558
run: |
@@ -77,13 +80,13 @@ jobs:
7780
7881
- name: Add To Build
7982
run: |
80-
if [[ "$IS_SAMPLE_OR_LAB" == "false" ]]; then
83+
if [[ "${{ inputs.is_framework_app }}" == "false" ]]; then
8184
sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST $APP_LOWER)" sample_defs/targets.cmake
8285
fi
8386
8487
- name: Add To Startup
8588
run: |
86-
if [[ "$IS_SAMPLE_OR_LAB" == "false" ]]; then
89+
if [[ "${{ inputs.is_framework_app }}" == "false" ]]; then
8790
sed -i "1i CFE_APP, $APP_LOWER, ${APP_UPPER}_AppMain, $APP_UPPER, 80, 16384, 0x0, 0;" sample_defs/cpu1_cfe_es_startup.scr
8891
cat sample_defs/cpu1_cfe_es_startup.scr
8992
fi

.github/workflows/unit-test-coverage.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
type: number
2020
required: false
2121
default: 0
22+
is_framework_app:
23+
description: Whether this is a framework/sample app or library
24+
type: boolean
25+
required: false
26+
default: false
2227

2328
# Force bash to apply pipefail option so pipeline failures aren't masked
2429
defaults:
@@ -53,11 +58,9 @@ jobs:
5358

5459
- name: Set up environment variables
5560
# Apps typically use lowercase targets and uppercase names, this logic is fragile but works
56-
# Mark the sample app/lib and lab apps as we don't need to add them to the build or startup file (they're already part of the bundle)
5761
run: |
5862
echo "APP_UPPER=$(echo ${{ inputs.app-name }} | sed 's/[a-z]/\U&/g')" >> $GITHUB_ENV
5963
echo "APP_LOWER=$(echo ${{ inputs.app-name }} | sed 's/[A-Z]/\L&/g')" >> $GITHUB_ENV
60-
echo "IS_SAMPLE_OR_LAB=$(echo ${{ inputs.app-name }} | grep -iqE 'sample|lab' && echo true || echo false)" >> $GITHUB_ENV
6164
6265
- name: Checkout Bundle Main
6366
uses: actions/checkout@v4
@@ -77,7 +80,7 @@ jobs:
7780
7881
- name: Add Repo To Build
7982
run: |
80-
if [[ "$IS_SAMPLE_OR_LAB" == "false" ]]; then
83+
if [[ "${{ inputs.is_framework_app }}" == "false" ]]; then
8184
sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST $APP_LOWER)" sample_defs/targets.cmake
8285
fi
8386

0 commit comments

Comments
 (0)