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

Ic workflow upgrades #5

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
55 changes: 53 additions & 2 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ jobs:
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

Local-Test-Build:

#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15
strategy:
matrix:
ref: [main, integration-candidate]

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true
submodules: true
ref: ${{ matrix.ref }}

- name: Checkout submodule
uses: actions/checkout@v2
Expand Down Expand Up @@ -105,4 +110,50 @@ jobs:
grep -i '\[ FAIL]\|\[ TSF]\|\[ TTF]' cf/cfe_test.log
exit -1
fi
working-directory: ./build/exe/cpu1/
working-directory: ./build/exe/cpu1/

Merge-IC:
runs-on: ubuntu-latest
# Map a step output to a job output
needs: Local-Test-Build
if: github.event_name == 'pull_request'
steps:

- name: Checkout IC
uses: actions/checkout@v2
with:
ref: integration-candidate


- name: merge and push
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git fetch origin pull/${{ github.event.pull_request.number }}/head
git checkout FETCH_HEAD
git switch -c this-pr
git rebase integration-candidate
git log -1
git log -1
git checkout integration-candidate
git merge this-pr
git log -1
git push origin integration-candidate


Rebase-IC:
# Anytime there's a push to main this rebases IC on top of main
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
runs-on: ubuntu-18.04

steps:
- name: Checkout submodule
uses: actions/checkout@v2
with:
path: cfe

- name: Rebase IC
run: |
git fetch origin
git rebase main
git push origin/integration-candidate