Skip to content

Commit

Permalink
add input parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Jan 7, 2025
1 parent 1fef726 commit 3e73936
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-run-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
type: string
required: false
default: ''
is_framework_app:
description: Whether this is a framework app (TO/CI/SCH Lab, Sample App)
type: boolean
required: false
default: false

# Force bash to apply pipefail option so pipeline failures aren't masked
defaults:
Expand Down Expand Up @@ -44,12 +49,9 @@ jobs:

steps:
- name: Set up environment variables
# Apps typically use lowercase targets and uppercase names, this logic is fragile but works
# 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)
run: |
echo "APP_UPPER=$(echo ${{ inputs.app-name }} | sed 's/[a-z]/\U&/g')" >> $GITHUB_ENV
echo "APP_LOWER=$(echo ${{ inputs.app-name }} | sed 's/[A-Z]/\L&/g')" >> $GITHUB_ENV
echo "IS_SAMPLE_OR_LAB=$(echo ${{ inputs.app-name }} | grep -iqE 'sample|lab' && echo true || echo false)" >> $GITHUB_ENV
- name: Set up start string for verification
run: |
Expand Down Expand Up @@ -77,13 +79,13 @@ jobs:
- name: Add To Build
run: |
if [[ "$IS_SAMPLE_OR_LAB" == "false" ]]; then
if [[ "${{ inputs.is_framework_app }}" == "false" ]]; then
sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST $APP_LOWER)" sample_defs/targets.cmake
fi
- name: Add To Startup
run: |
if [[ "$IS_SAMPLE_OR_LAB" == "false" ]]; then
if [[ "${{ inputs.is_framework_app }}" == "false" ]]; then
sed -i "1i CFE_APP, $APP_LOWER, ${APP_UPPER}_AppMain, $APP_UPPER, 80, 16384, 0x0, 0;" sample_defs/cpu1_cfe_es_startup.scr
cat sample_defs/cpu1_cfe_es_startup.scr
fi
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/unit-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
type: number
required: false
default: 0
is_framework_app:
description: Whether this is a framework app (TO/CI/SCH Lab, Sample App)
type: boolean
required: false
default: false

# Force bash to apply pipefail option so pipeline failures aren't masked
defaults:
Expand Down Expand Up @@ -52,12 +57,9 @@ jobs:
run: sudo apt-get install lcov -y

- name: Set up environment variables
# Apps typically use lowercase targets and uppercase names, this logic is fragile but works
# 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)
run: |
echo "APP_UPPER=$(echo ${{ inputs.app-name }} | sed 's/[a-z]/\U&/g')" >> $GITHUB_ENV
echo "APP_LOWER=$(echo ${{ inputs.app-name }} | sed 's/[A-Z]/\L&/g')" >> $GITHUB_ENV
echo "IS_SAMPLE_OR_LAB=$(echo ${{ inputs.app-name }} | grep -iqE 'sample|lab' && echo true || echo false)" >> $GITHUB_ENV
- name: Checkout Bundle Main
uses: actions/checkout@v4
Expand All @@ -77,7 +79,7 @@ jobs:
- name: Add Repo To Build
run: |
if [[ "$IS_SAMPLE_OR_LAB" == "false" ]]; then
if [[ "${{ inputs.is_framework_app }}" == "false" ]]; then
sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST $APP_LOWER)" sample_defs/targets.cmake
fi
Expand Down
2 changes: 1 addition & 1 deletion apps/sample_app
Submodule sample_app updated 51 files
+2 −2 .github/workflows/codeql-build.yml
+0 −191 CHANGELOG.md
+11 −11 CMakeLists.txt
+5 −17 README.md
+7 −7 SECURITY.md
+13 −13 arch_build.cmake
+8 −8 config/default_bpacc_fun_fcncodes.h
+4 −4 config/default_bpacc_fun_interface_cfg.h
+7 −7 config/default_bpacc_fun_internal_cfg.h
+4 −4 config/default_bpacc_fun_mission_cfg.h
+7 −7 config/default_bpacc_fun_msg.h
+11 −11 config/default_bpacc_fun_msgdefs.h
+7 −7 config/default_bpacc_fun_msgids.h
+16 −16 config/default_bpacc_fun_msgstruct.h
+3 −3 config/default_bpacc_fun_perfids.h
+5 −5 config/default_bpacc_fun_platform_cfg.h
+7 −7 config/default_bpacc_fun_tbl.h
+7 −7 config/default_bpacc_fun_tbldefs.h
+5 −5 config/default_bpacc_fun_tblstruct.h
+6 −6 config/default_bpacc_fun_topicids.h
+42 −0 fsw/inc/bpacc_fun_eventids.h
+0 −42 fsw/inc/sample_app_eventids.h
+16 −16 fsw/src/bpacc_fun.h
+52 −51 fsw/src/bpacc_fun_app.c
+41 −43 fsw/src/bpacc_fun_cmds.c
+10 −10 fsw/src/bpacc_fun_cmds.h
+34 −34 fsw/src/bpacc_fun_dispatch.c
+8 −8 fsw/src/bpacc_fun_dispatch.h
+25 −25 fsw/src/bpacc_fun_eds_dispatch.c
+13 −13 fsw/src/bpacc_fun_utils.c
+7 −7 fsw/src/bpacc_fun_utils.h
+18 −18 fsw/src/bpacc_fun_version.h
+3 −3 fsw/tables/bpacc_fun_tbl.c
+26 −26 mission_build.cmake
+16 −16 unit-test/CMakeLists.txt
+3 −3 unit-test/common/eventcheck.c
+2 −2 unit-test/common/eventcheck.h
+4 −4 unit-test/common/setup.c
+4 −4 unit-test/common/setup.h
+13 −13 unit-test/coveragetest/bpacc_fun_coveragetest_common.h
+25 −26 unit-test/coveragetest/coveragetest_bpacc_fun_app.c
+41 −48 unit-test/coveragetest/coveragetest_bpacc_fun_cmds.c
+58 −58 unit-test/coveragetest/coveragetest_bpacc_fun_dispatch.c
+9 −9 unit-test/coveragetest/coveragetest_bpacc_fun_eds_dispatch.c
+17 −18 unit-test/coveragetest/coveragetest_bpacc_fun_utils.c
+106 −0 unit-test/stubs/bpacc_fun_cmds_stubs.c
+17 −17 unit-test/stubs/bpacc_fun_dispatch_stubs.c
+2 −2 unit-test/stubs/bpacc_fun_global_stubs.c
+10 −10 unit-test/stubs/bpacc_fun_stubs.c
+12 −12 unit-test/stubs/bpacc_fun_utils_stubs.c
+0 −106 unit-test/stubs/sample_app_cmds_stubs.c
2 changes: 1 addition & 1 deletion apps/to_lab

0 comments on commit 3e73936

Please sign in to comment.