Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSP Integration candidate: Caelum-rc4+dev47 #392

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/icbundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Integration Candidate Bundle Generation

# Generate Integration Candidate branch for this repository.

on:
workflow_dispatch:
inputs:
pr_nums:
description: 'The pull request numbers to include (Comma separated)'
required: true
type: string

jobs:
generate-ic-bundle:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt update
run: sudo apt install -y w3m
- name: Checkout IC Branch
uses: actions/checkout@v3
with:
fetch-depth: '0'
ref: main
- name: Rebase IC Branch
run: git config user.name "GitHub Actions"
run: git config user.email "cfs-program@list.nasa.gov"
run: git pull
run: git checkout integration-candidate
run: git rebase main
- name: Merge each PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
prs=$(echo ${{ inputs.pr_nums }} | tr "," "\n")
for pr in $prs
do
src_branch=$(hub pr show -f %H $pr)
pr_title=$(hub pr show -f %t $pr)
commit_msg=$'Merge pull request #'"${pr}"$' from '"${src_branch}"$'\n\n'"${pr_title}"
git fetch origin pull/$pr/head:origin/pull/$pr/head
git merge origin/pull/$pr/head --no-ff -m "$commit_msg"
done
- name: Update Changelog and Version.h files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
rev_num=$(git rev-list v1.6.0-rc4.. --count)
changelog_entry=$'# Changelog\\n\\n# Development Build: v1.6.0-rc4+dev'${rev_num}
prs=$(echo ${{ inputs.pr_nums }} | tr "," "\n")
see_entry=$'\-\ See:'
for pr in $prs
do
pr_title=$(hub pr show -f %t $pr)
changelog_entry="${changelog_entry}"$'\\n- '"${pr_title@Q}"
see_entry="${see_entry}"$' <https://github.com/nasa/cFE/pull/'${pr}$'>'
done
changelog_entry="${changelog_entry}\n${see_entry}\n"
sed -ir "s|# Changelog|$changelog_entry|" CHANGELOG.md

buildnumber_entry=$'#define CFE_PSP_IMPL_BUILD_NUMBER '${rev_num}
sed -ir "s|define CFE_PSP_IMPL_BUILD_NUMBER.*|$buildnumber_entry|" fsw/mcp750-vxworks/inc/psp_version.h

buildnumber_entry=$'#define CFE_PSP_IMPL_BUILD_NUMBER '${rev_num}
sed -ir "s|define CFE_PSP_IMPL_BUILD_NUMBER.*|$buildnumber_entry|" fsw/pc-linux/inc/psp_version.h

buildnumber_entry=$'#define CFE_PSP_IMPL_BUILD_NUMBER '${rev_num}
sed -ir "s|define CFE_PSP_IMPL_BUILD_NUMBER.*|$buildnumber_entry|" fsw/pc-rtems/inc/psp_version.h
- name: Commit and Push Updates to IC Branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git add CHANGELOG.md
run: git add fsw/mcp750-vxworks/inc/psp_version.h
run: git add fsw/pc-linux/inc/psp_version.h
run: git add fsw/pc-rtems/inc/psp_version.h
run: |
rev_num=$(git rev-list v1.6.0-rc4.. --count)
git commit -m "Updating documentation and version numbers for v1.6.0-rc4+dev${rev_num}"
run: git push -v origin integration-candidate
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Development Build: v1.6.0-rc4+dev76
- Create Workflow for IC Bundle Generation
- See <https://github.com/nasa/PSP/pull/391>

## Development Build: v1.6.0-rc4+dev72
- adds generic driver interface and Linux sysmon module
- See <https://github.com/nasa/PSP/pull/386>
Expand Down
2 changes: 1 addition & 1 deletion fsw/mcp750-vxworks/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 72
#define CFE_PSP_IMPL_BUILD_NUMBER 76
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4"

/*
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-linux/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 72
#define CFE_PSP_IMPL_BUILD_NUMBER 76
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4"

/*
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-rtems/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 72
#define CFE_PSP_IMPL_BUILD_NUMBER 76
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4"

/*
Expand Down