From 862cab41a7c338d558b1c6c83a88595c68f658b0 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Mon, 4 Oct 2021 12:19:01 -0400 Subject: [PATCH 01/10] Add matrix job to run against the bundle integration candidate --- .github/workflows/functional-tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 0cda3b2fc..4932c090b 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -27,11 +27,15 @@ 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 @@ -39,7 +43,8 @@ jobs: uses: actions/checkout@v2 with: repository: nasa/cFS - submodules: true + submodules: true + ref: ${{ matrix.ref }} - name: Checkout submodule uses: actions/checkout@v2 @@ -105,4 +110,4 @@ jobs: grep -i '\[ FAIL]\|\[ TSF]\|\[ TTF]' cf/cfe_test.log exit -1 fi - working-directory: ./build/exe/cpu1/ \ No newline at end of file + working-directory: ./build/exe/cpu1/ \ No newline at end of file From df8d78901f8814ae977e96887bc93e7e1a8eba00 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Mon, 4 Oct 2021 12:19:20 -0400 Subject: [PATCH 02/10] Add job to rebase integration-candidate after push to main --- .github/workflows/functional-tests.yml | 46 +++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 4932c090b..5a0c11949 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -110,4 +110,48 @@ jobs: grep -i '\[ FAIL]\|\[ TSF]\|\[ TTF]' cf/cfe_test.log exit -1 fi - working-directory: ./build/exe/cpu1/ \ No newline at end of file + 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 submodule + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + + - name: merge and push + run: | + git checkout -b temp + git log -1 + git fetch origin integration-candidate + git checkout integration-candidate + git log -1 + git config user.name github-actions + git config user.email github-actions@github.com + git merge --allow-unrelated-histories --no-ff temp -m "Test Merge #${{ github.event.pull_request.number }}" + git log -1 + git push + + + 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 \ No newline at end of file From 41fe2edd4089679437621fda3f9e3decd1e1b7f5 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 12:15:03 -0400 Subject: [PATCH 03/10] Try changing checkou target --- .github/workflows/functional-tests.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 5a0c11949..d3a2262cb 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -119,24 +119,22 @@ jobs: if: github.event_name == 'pull_request' steps: - - name: Checkout submodule + - name: Checkout IC uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: integration-candidate - name: merge and push - run: | - git checkout -b temp - git log -1 - git fetch origin integration-candidate - git checkout integration-candidate - git log -1 + run: | git config user.name github-actions git config user.email github-actions@github.com - git merge --allow-unrelated-histories --no-ff temp -m "Test Merge #${{ github.event.pull_request.number }}" + git fetch origin pull/${{ github.event.pull_request.number }}/head + git branch + git log -1 + git merge pull/${{ github.event.pull_request.number }}/head git log -1 - git push + git push origin/integration-candidate Rebase-IC: From 3ad353101137864632479584b1fd1b2db789f09b Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 12:27:18 -0400 Subject: [PATCH 04/10] Create temporary branch with PR content --- .github/workflows/functional-tests.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index d3a2262cb..732eae474 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -129,10 +129,13 @@ jobs: 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 branch - git log -1 - git merge pull/${{ github.event.pull_request.number }}/head + git checkout origin pull/${{ github.event.pull_request.number }}/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 From b4f1fe8504506abae4aea140611b05abff5602b3 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 12:33:07 -0400 Subject: [PATCH 05/10] Re-add fetch step --- .github/workflows/functional-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 732eae474..35940aaba 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -129,6 +129,7 @@ jobs: 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 origin pull/${{ github.event.pull_request.number }}/head git switch -c this-pr git rebase integration-candidate From 22d8fccf233f080aa47b0c6c934e7c2125776090 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 13:04:57 -0400 Subject: [PATCH 06/10] Fix fetch format --- .github/workflows/functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 35940aaba..95c75209b 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -129,7 +129,7 @@ jobs: 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 fetch origin pull/${{ github.event.pull_request.number }}/head git checkout origin pull/${{ github.event.pull_request.number }}/head git switch -c this-pr git rebase integration-candidate From 2a0677735c1d6e2cd4229778aed8cfe373fd93df Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 13:33:08 -0400 Subject: [PATCH 07/10] Fix checkout step --- .github/workflows/functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 95c75209b..6f1ba3523 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -130,7 +130,7 @@ jobs: 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 origin pull/${{ github.event.pull_request.number }}/head + git checkout refs/pull/${{ github.event.pull_request.number }}/head git switch -c this-pr git rebase integration-candidate git log -1 From 974699f318390c4bae0e711ce785afec75eca0c8 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 13:46:44 -0400 Subject: [PATCH 08/10] Add branch listing command --- .github/workflows/functional-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 6f1ba3523..e9748adc9 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -129,8 +129,9 @@ jobs: 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 refs/pull/${{ github.event.pull_request.number }}/head + git fetch origin pull/${{ github.event.pull_request.number }}/head + git branch -a + git checkout origin/refs/pull/${{ github.event.pull_request.number }}/head git switch -c this-pr git rebase integration-candidate git log -1 From 8f191d207c92e08c52c855ffb971b3d3bad7e39e Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 14:21:22 -0400 Subject: [PATCH 09/10] try FETCH_HEAD --- .github/workflows/functional-tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index e9748adc9..5636ddc6f 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -129,9 +129,8 @@ jobs: 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 branch -a - git checkout origin/refs/pull/${{ github.event.pull_request.number }}/head + 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 From e2a949b18cb43d2c26ad124c7876ab04b2f2e639 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 5 Oct 2021 15:23:27 -0400 Subject: [PATCH 10/10] Fix push step --- .github/workflows/functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 5636ddc6f..00e518c14 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -138,7 +138,7 @@ jobs: git checkout integration-candidate git merge this-pr git log -1 - git push origin/integration-candidate + git push origin integration-candidate Rebase-IC: