From db07596af67fc9bae5aba3241b8f75b1f585ca30 Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Thu, 17 Oct 2024 18:18:25 +0000 Subject: [PATCH 01/17] added dynamicaly creating branches from PRs --- .github/workflows/pw_aws_centos.yaml | 47 +++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pw_aws_centos.yaml b/.github/workflows/pw_aws_centos.yaml index 76258c3044..6020cfaf21 100644 --- a/.github/workflows/pw_aws_centos.yaml +++ b/.github/workflows/pw_aws_centos.yaml @@ -1,42 +1,50 @@ name: gw-ci-aws-centos -on: [workflow_dispatch] +on: + workflow_dispatch: + inputs: + branch: + description: 'Select the branch to run the workflow on' + required: true + default: 'main' -# TEST_DIR contains 2 directories; -# 1. HOMEgfs: clone of the global-workflow -# 2. RUNTESTS: A directory containing EXPDIR and COMROT for experiments -# e.g. $> tree ./TEST_DIR -# ./TEST_DIR -# ├── HOMEgfs -# └── RUNTESTS -# ├── COMROT -# │   └── ${pslot} -# └── EXPDIR -# └── ${pslot} env: TEST_DIR: ${{ github.workspace }}/${{ github.run_id }} MACHINE_ID: noaacloud jobs: + fetch-prs: + runs-on: ubuntu-latest + outputs: + branches: ${{ steps.get-pr-branches.outputs.branches }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Fetch open pull requests + id: get-pr-branches + run: | + pr_branches=$(gh pr list --json headRefName --jq '.[] | .headRefName') + echo "::set-output name=branches::$pr_branches" + checkout: runs-on: [self-hosted, aws, parallelworks, centos] + needs: fetch-prs timeout-minutes: 600 steps: - - name: Checkout global-workflow uses: actions/checkout@v4 with: path: ${{ github.run_id }}/HOMEgfs submodules: 'recursive' - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event.inputs.branch }} build-link: runs-on: [self-hosted, aws, parallelworks, centos] needs: checkout steps: - - name: Build components run: | cd ${{ env.TEST_DIR }}/HOMEgfs/sorc @@ -48,7 +56,7 @@ jobs: ./link_workflow.sh create-experiments: - needs: checkout + needs: build-link runs-on: [self-hosted, aws, parallelworks, centos] strategy: matrix: @@ -81,9 +89,4 @@ jobs: clean-up: needs: run-experiments - runs-on: [self-hosted, aws, parallelworks, centos] - steps: - - name: Clean-up - run: | - cd ${{ github.workspace }} - rm -rf ${{ github.run_id }} + runs-on: [self-hosted, aws, parallelworks, centos] \ No newline at end of file From 54a6a5fcb44e60d736b0f2885e76f884d50a568c Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Thu, 17 Oct 2024 18:46:39 +0000 Subject: [PATCH 02/17] clean up needed steps --- .github/workflows/pw_aws_centos.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pw_aws_centos.yaml b/.github/workflows/pw_aws_centos.yaml index 6020cfaf21..e01693b1f8 100644 --- a/.github/workflows/pw_aws_centos.yaml +++ b/.github/workflows/pw_aws_centos.yaml @@ -89,4 +89,9 @@ jobs: clean-up: needs: run-experiments - runs-on: [self-hosted, aws, parallelworks, centos] \ No newline at end of file + runs-on: [self-hosted, aws, parallelworks, centos] + steps: + - name: Clean up + run: | + echo "Cleaning up workspace" + rm -rf ${{ env.TEST_DIR }} \ No newline at end of file From 538eaade7819da322b86f68a2b7c04e11c1eb263 Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Thu, 17 Oct 2024 18:48:38 +0000 Subject: [PATCH 03/17] missed indentation on clean up for script bit --- .github/workflows/pw_aws_centos.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pw_aws_centos.yaml b/.github/workflows/pw_aws_centos.yaml index e01693b1f8..2f4938651a 100644 --- a/.github/workflows/pw_aws_centos.yaml +++ b/.github/workflows/pw_aws_centos.yaml @@ -93,5 +93,5 @@ jobs: steps: - name: Clean up run: | - echo "Cleaning up workspace" - rm -rf ${{ env.TEST_DIR }} \ No newline at end of file + echo "Cleaning up workspace" + rm -rf ${{ env.TEST_DIR }} \ No newline at end of file From f70c3e96c0ab0b3e485d79d06ad6621d68a19f3d Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Thu, 17 Oct 2024 19:26:29 +0000 Subject: [PATCH 04/17] here we print and pass the list of PRs --- .github/workflows/pw_aws_centos.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pw_aws_centos.yaml b/.github/workflows/pw_aws_centos.yaml index 2f4938651a..4c5d2a539b 100644 --- a/.github/workflows/pw_aws_centos.yaml +++ b/.github/workflows/pw_aws_centos.yaml @@ -2,11 +2,9 @@ name: gw-ci-aws-centos on: workflow_dispatch: - inputs: - branch: - description: 'Select the branch to run the workflow on' - required: true - default: 'main' + pull_request: + branches: + - develop env: TEST_DIR: ${{ github.workspace }}/${{ github.run_id }} @@ -15,6 +13,8 @@ env: jobs: fetch-prs: runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUBTOKEN }} outputs: branches: ${{ steps.get-pr-branches.outputs.branches }} steps: From 724538c85fb54d11e744da9a7eae573b643b4a9a Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 16:33:54 +0000 Subject: [PATCH 05/17] adding second runner dev rocky --- .github/workflows/pw_aws_rocky.yaml | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/pw_aws_rocky.yaml diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml new file mode 100644 index 0000000000..d72e93962f --- /dev/null +++ b/.github/workflows/pw_aws_rocky.yaml @@ -0,0 +1,82 @@ +name: gw-ci-aws-rocky + +on: [workflow_dispatch] + +# TEST_DIR contains 2 directories; +# 1. HOMEgfs: clone of the global-workflow +# 2. RUNTESTS: A directory containing EXPDIR and COMROT for experiments +# e.g. $> tree ./TEST_DIR +# ./TEST_DIR +# ├── HOMEgfs +# └── RUNTESTS +# ├── COMROT +# │ └── ${pslot} +# └── EXPDIR +# └── ${pslot} +env: + TEST_DIR: ${{ github.workspace }}/${{ github.run_id }} + MACHINE_ID: noaacloud + +jobs: + checkout-build-link: + runs-on: [self-hosted, aws, parallelworks, rocky] + timeout-minutes: 600 + + steps: + + - name: Checkout global-workflow + uses: actions/checkout@v4 + with: + path: ${{ github.run_id }}/HOMEgfs + submodules: 'recursive' + + - name: Build components + run: | + cd ${{ env.TEST_DIR }}/HOMEgfs/sorc + ./build_all.sh -j 8 + + - name: Link artifacts + run: | + cd ${{ env.TEST_DIR }}/HOMEgfs/sorc + ./link_workflow.sh + + create-experiments: + needs: checkout-build-link + runs-on: [self-hosted, aws, parallelworks, rocky] + strategy: + matrix: + case: ["C48_ATM"] + + steps: + - name: Create Experiments ${{ matrix.case }} + env: + RUNTESTS: ${{ env.TEST_DIR }}/RUNTESTS + pslot: ${{ matrix.case }}.${{ github.run_id }} + run: | + mkdir -p ${{ env.RUNTESTS }} + cd ${{ env.TEST_DIR }}/HOMEgfs + source workflow/gw_setup.sh + source ci/platforms/config.noaacloud + ./workflow/create_experiment.py --yaml ci/cases/pr/${{ matrix.case }}.yaml --overwrite + + run-experiments: + needs: create-experiments + runs-on: [self-hosted, aws, parallelworks, rocky] + strategy: + max-parallel: 2 + matrix: + case: ["C48_ATM"] + steps: + - name: Run Experiment ${{ matrix.case }} + run: | + cd ${{ env.TEST_DIR }}/HOMEgfs + ./ci/scripts/run-check_ci.sh ${{ env.TEST_DIR }} ${{ matrix.case }}.${{ github.run_id }} HOMEgfs + + clean-up: + needs: run-experiments + runs-on: [self-hosted, aws, parallelworks, rocky] + steps: + - name: Clean-up + run: | + cd ${{ github.workspace }} + rm -rf ${{ github.run_id }} \ No newline at end of file From 50e98da08e24a9c09e1e9799f03d6de793508dfd Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 17:19:38 +0000 Subject: [PATCH 06/17] updated pipeline to use PR number as input --- .github/workflows/pw_aws_rocky.yaml | 39 ++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index d72e93962f..371be9ca8f 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -1,6 +1,12 @@ name: gw-ci-aws-rocky -on: [workflow_dispatch] +on: + workflow_dispatch: + inputs: + pr_number: + description: 'Pull Request Number' + required: true + default: '' # TEST_DIR contains 2 directories; # 1. HOMEgfs: clone of the global-workflow @@ -18,18 +24,34 @@ env: MACHINE_ID: noaacloud jobs: - checkout-build-link: + fetch-branch: + runs-on: ubuntu-latest + outputs: + branch: ${{ steps.get-branch.outputs.branch }} + steps: + - name: Fetch branch name for PR + id: get-branch + run: | + pr_number=${{ github.event.inputs.pr_number }} + branch=$(gh pr view $pr_number --json headRefName --jq '.headRefName') + echo "::set-output name=branch::$branch" + + checkout: + needs: fetch-branch runs-on: [self-hosted, aws, parallelworks, rocky] timeout-minutes: 600 - steps: - - name: Checkout global-workflow uses: actions/checkout@v4 with: path: ${{ github.run_id }}/HOMEgfs submodules: 'recursive' + ref: ${{ needs.fetch-branch.outputs.branch }} + build-link: + needs: checkout + runs-on: [self-hosted, aws, parallelworks, rocky] + steps: - name: Build components run: | cd ${{ env.TEST_DIR }}/HOMEgfs/sorc @@ -41,12 +63,11 @@ jobs: ./link_workflow.sh create-experiments: - needs: checkout-build-link + needs: build-link runs-on: [self-hosted, aws, parallelworks, rocky] strategy: matrix: case: ["C48_ATM"] - steps: - name: Create Experiments ${{ matrix.case }} env: @@ -76,7 +97,7 @@ jobs: needs: run-experiments runs-on: [self-hosted, aws, parallelworks, rocky] steps: - - name: Clean-up + - name: Clean up workspace run: | - cd ${{ github.workspace }} - rm -rf ${{ github.run_id }} \ No newline at end of file + echo "Cleaning up workspace" + rm -rf ${{ env.TEST_DIR }} From a831f1a088965bcbc573ea84d3b548863f3ff4ba Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 17:29:39 +0000 Subject: [PATCH 07/17] added authentication token for gh for getting branch names from PR numberS --- .github/workflows/pw_aws_rocky.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index 371be9ca8f..0d44352f59 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -26,6 +26,8 @@ env: jobs: fetch-branch: runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUBTOKEN }} outputs: branch: ${{ steps.get-branch.outputs.branch }} steps: From 2b815d73547ea74fada8789db7a7c2cface4e375 Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 17:39:40 +0000 Subject: [PATCH 08/17] added repo switch to gh command to get branch name from PR number --- .github/workflows/pw_aws_rocky.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index 0d44352f59..ec7b9d7c51 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -35,7 +35,8 @@ jobs: id: get-branch run: | pr_number=${{ github.event.inputs.pr_number }} - branch=$(gh pr view $pr_number --json headRefName --jq '.headRefName') + repo=${{ github.repository }} + branch=$(gh pr --repo $repo view $pr_number --json headRefName --jq '.headRefName') echo "::set-output name=branch::$branch" checkout: From f6165df68bb11d118004ba5ce9b5f0cded8efbf7 Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 18:11:50 +0000 Subject: [PATCH 09/17] try making operating system choice selectable too --- .github/workflows/pw_aws_rocky.yaml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index ec7b9d7c51..2ecfa00338 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -7,6 +7,13 @@ on: description: 'Pull Request Number' required: true default: '' + os: + description: 'Operating System' + required: true + type: choice + options: + - rocky + - centos # TEST_DIR contains 2 directories; # 1. HOMEgfs: clone of the global-workflow @@ -36,12 +43,14 @@ jobs: run: | pr_number=${{ github.event.inputs.pr_number }} repo=${{ github.repository }} - branch=$(gh pr --repo $repo view $pr_number --json headRefName --jq '.headRefName') + branch=$(gh pr view $pr_number --repo $repo --json headRefName --jq '.headRefName') echo "::set-output name=branch::$branch" checkout: needs: fetch-branch - runs-on: [self-hosted, aws, parallelworks, rocky] + strategy: + matrix: + os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] timeout-minutes: 600 steps: - name: Checkout global-workflow @@ -53,7 +62,9 @@ jobs: build-link: needs: checkout - runs-on: [self-hosted, aws, parallelworks, rocky] + strategy: + matrix: + os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] steps: - name: Build components run: | @@ -67,9 +78,9 @@ jobs: create-experiments: needs: build-link - runs-on: [self-hosted, aws, parallelworks, rocky] strategy: matrix: + os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] case: ["C48_ATM"] steps: - name: Create Experiments ${{ matrix.case }} @@ -85,10 +96,9 @@ jobs: run-experiments: needs: create-experiments - runs-on: [self-hosted, aws, parallelworks, rocky] strategy: - max-parallel: 2 matrix: + os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] case: ["C48_ATM"] steps: - name: Run Experiment ${{ matrix.case }} @@ -98,9 +108,11 @@ jobs: clean-up: needs: run-experiments - runs-on: [self-hosted, aws, parallelworks, rocky] + strategy: + matrix: + os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] steps: - name: Clean up workspace run: | echo "Cleaning up workspace" - rm -rf ${{ env.TEST_DIR }} + rm -rf ${{ env.TEST_DIR }} \ No newline at end of file From 10eb145932ec5d94929be495806e5b83b617963e Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 18:16:43 +0000 Subject: [PATCH 10/17] try making operating system choice selectable 2 --- .github/workflows/pw_aws_rocky.yaml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index 2ecfa00338..04aa94322c 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -48,9 +48,7 @@ jobs: checkout: needs: fetch-branch - strategy: - matrix: - os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] timeout-minutes: 600 steps: - name: Checkout global-workflow @@ -62,9 +60,7 @@ jobs: build-link: needs: checkout - strategy: - matrix: - os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] steps: - name: Build components run: | @@ -78,9 +74,9 @@ jobs: create-experiments: needs: build-link + runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] strategy: matrix: - os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] case: ["C48_ATM"] steps: - name: Create Experiments ${{ matrix.case }} @@ -96,9 +92,10 @@ jobs: run-experiments: needs: create-experiments + runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] strategy: + max-parallel: 2 matrix: - os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] case: ["C48_ATM"] steps: - name: Run Experiment ${{ matrix.case }} @@ -108,11 +105,9 @@ jobs: clean-up: needs: run-experiments - strategy: - matrix: - os: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] steps: - name: Clean up workspace run: | echo "Cleaning up workspace" - rm -rf ${{ env.TEST_DIR }} \ No newline at end of file + rm -rf ${{ env.TEST_DIR }} From 5d3bc34998d1c4c52b50f0855f3d730f5eeda385 Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 18:24:43 +0000 Subject: [PATCH 11/17] try making operating system choice selectable 3 --- .github/workflows/pw_aws_rocky.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index 04aa94322c..508b7d493a 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -48,7 +48,7 @@ jobs: checkout: needs: fetch-branch - runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} timeout-minutes: 600 steps: - name: Checkout global-workflow @@ -60,7 +60,7 @@ jobs: build-link: needs: checkout - runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} steps: - name: Build components run: | @@ -74,7 +74,7 @@ jobs: create-experiments: needs: build-link - runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} strategy: matrix: case: ["C48_ATM"] @@ -92,7 +92,7 @@ jobs: run-experiments: needs: create-experiments - runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} strategy: max-parallel: 2 matrix: @@ -105,9 +105,10 @@ jobs: clean-up: needs: run-experiments - runs-on: [self-hosted, aws, parallelworks, ${{ github.event.inputs.os }}] + runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} steps: - name: Clean up workspace run: | echo "Cleaning up workspace" rm -rf ${{ env.TEST_DIR }} + \ No newline at end of file From e59fa2f6ad6a34a18ad65ab01f3e2fe93d0e997c Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 20:24:09 +0000 Subject: [PATCH 12/17] try using a list for runs-on: --- .github/workflows/pw_aws_rocky.yaml | 46 +++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index 508b7d493a..75856f29d7 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -14,6 +14,18 @@ on: options: - rocky - centos + common-runners: &common-runners + - self-hosted + - aws + - parallelworks + + runs-on-rocky: + <<: *common-runners + - rocky + + runs-on-centos: + <<: *common-runners + - centos # TEST_DIR contains 2 directories; # 1. HOMEgfs: clone of the global-workflow @@ -48,7 +60,11 @@ jobs: checkout: needs: fetch-branch - runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} + runs-on: + - self-hosted + - aws + - parallelworks + - ${{ github.event.inputs.os }} timeout-minutes: 600 steps: - name: Checkout global-workflow @@ -60,7 +76,11 @@ jobs: build-link: needs: checkout - runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} + runs-on: + - self-hosted + - aws + - parallelworks + - ${{ github.event.inputs.os }} steps: - name: Build components run: | @@ -74,7 +94,11 @@ jobs: create-experiments: needs: build-link - runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} + runs-on: + - self-hosted + - aws + - parallelworks + - ${{ github.event.inputs.os }} strategy: matrix: case: ["C48_ATM"] @@ -92,11 +116,11 @@ jobs: run-experiments: needs: create-experiments - runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} - strategy: - max-parallel: 2 - matrix: - case: ["C48_ATM"] + runs-on: + - self-hosted + - aws + - parallelworks + - ${{ github.event.inputs.os }} steps: - name: Run Experiment ${{ matrix.case }} run: | @@ -105,7 +129,11 @@ jobs: clean-up: needs: run-experiments - runs-on: ${{ github.event.inputs.os == 'rocky' && 'self-hosted, aws, parallelworks, rocky' || 'self-hosted, aws, parallelworks, centos' }} + runs-on: + - self-hosted + - aws + - parallelworks + - ${{ github.event.inputs.os }} steps: - name: Clean up workspace run: | From 3cc97d92fa06b5a5490eb1f9e50c8dd0368a4cdd Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 20:25:55 +0000 Subject: [PATCH 13/17] removed reference yaml cases --- .github/workflows/pw_aws_rocky.yaml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_rocky.yaml index 75856f29d7..9b01f6cc33 100644 --- a/.github/workflows/pw_aws_rocky.yaml +++ b/.github/workflows/pw_aws_rocky.yaml @@ -14,18 +14,6 @@ on: options: - rocky - centos - common-runners: &common-runners - - self-hosted - - aws - - parallelworks - - runs-on-rocky: - <<: *common-runners - - rocky - - runs-on-centos: - <<: *common-runners - - centos # TEST_DIR contains 2 directories; # 1. HOMEgfs: clone of the global-workflow From 9923de0c13bd7e615b7ece8bf05718d47dfd87ff Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 20:35:54 +0000 Subject: [PATCH 14/17] renamed rocky to generic beause it is now selectable --- .github/workflows/{pw_aws_rocky.yaml => pw_aws_ci.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{pw_aws_rocky.yaml => pw_aws_ci.yaml} (100%) diff --git a/.github/workflows/pw_aws_rocky.yaml b/.github/workflows/pw_aws_ci.yaml similarity index 100% rename from .github/workflows/pw_aws_rocky.yaml rename to .github/workflows/pw_aws_ci.yaml From 2904e5c81668d88c40822d0ab8dad0705eb4f32d Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 20:38:40 +0000 Subject: [PATCH 15/17] renamed aws ci pipeline --- .github/workflows/pw_aws_centos.yaml | 97 ---------------------------- 1 file changed, 97 deletions(-) delete mode 100644 .github/workflows/pw_aws_centos.yaml diff --git a/.github/workflows/pw_aws_centos.yaml b/.github/workflows/pw_aws_centos.yaml deleted file mode 100644 index 4c5d2a539b..0000000000 --- a/.github/workflows/pw_aws_centos.yaml +++ /dev/null @@ -1,97 +0,0 @@ -name: gw-ci-aws-centos - -on: - workflow_dispatch: - pull_request: - branches: - - develop - -env: - TEST_DIR: ${{ github.workspace }}/${{ github.run_id }} - MACHINE_ID: noaacloud - -jobs: - fetch-prs: - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ secrets.GITHUBTOKEN }} - outputs: - branches: ${{ steps.get-pr-branches.outputs.branches }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Fetch open pull requests - id: get-pr-branches - run: | - pr_branches=$(gh pr list --json headRefName --jq '.[] | .headRefName') - echo "::set-output name=branches::$pr_branches" - - checkout: - runs-on: [self-hosted, aws, parallelworks, centos] - needs: fetch-prs - timeout-minutes: 600 - - steps: - - name: Checkout global-workflow - uses: actions/checkout@v4 - with: - path: ${{ github.run_id }}/HOMEgfs - submodules: 'recursive' - ref: ${{ github.event.inputs.branch }} - - build-link: - runs-on: [self-hosted, aws, parallelworks, centos] - needs: checkout - - steps: - - name: Build components - run: | - cd ${{ env.TEST_DIR }}/HOMEgfs/sorc - ./build_all.sh -j 8 - - - name: Link artifacts - run: | - cd ${{ env.TEST_DIR }}/HOMEgfs/sorc - ./link_workflow.sh - - create-experiments: - needs: build-link - runs-on: [self-hosted, aws, parallelworks, centos] - strategy: - matrix: - case: ["C48_ATM"] - - steps: - - name: Create Experiments ${{ matrix.case }} - env: - RUNTESTS: ${{ env.TEST_DIR }}/RUNTESTS - pslot: ${{ matrix.case }}.${{ github.run_id }} - run: | - mkdir -p ${{ env.RUNTESTS }} - cd ${{ env.TEST_DIR }}/HOMEgfs - source workflow/gw_setup.sh - source ci/platforms/config.noaacloud - ./workflow/create_experiment.py --yaml ci/cases/pr/${{ matrix.case }}.yaml --overwrite - - run-experiments: - needs: create-experiments - runs-on: [self-hosted, aws, parallelworks, centos] - strategy: - max-parallel: 2 - matrix: - case: ["C48_ATM"] - steps: - - name: Run Experiment ${{ matrix.case }} - run: | - cd ${{ env.TEST_DIR }}/HOMEgfs - ./ci/scripts/run-check_ci.sh ${{ env.TEST_DIR }} ${{ matrix.case }}.${{ github.run_id }} HOMEgfs - - clean-up: - needs: run-experiments - runs-on: [self-hosted, aws, parallelworks, centos] - steps: - - name: Clean up - run: | - echo "Cleaning up workspace" - rm -rf ${{ env.TEST_DIR }} \ No newline at end of file From 43e41c2ef8c9113ec24b2b2e868059f797b871ff Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 20:44:53 +0000 Subject: [PATCH 16/17] cleaned up name of wf --- .github/workflows/pw_aws_ci.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pw_aws_ci.yaml b/.github/workflows/pw_aws_ci.yaml index 9b01f6cc33..3039ca2edb 100644 --- a/.github/workflows/pw_aws_ci.yaml +++ b/.github/workflows/pw_aws_ci.yaml @@ -1,4 +1,15 @@ -name: gw-ci-aws-rocky +name: gw-ci-aws +# TEST_DIR contains 2 directories; +# 1. HOMEgfs: clone of the global-workflow +# 2. RUNTESTS: A directory containing EXPDIR and COMROT for experiments +# e.g. $> tree ./TEST_DIR +# ./TEST_DIR +# ├── HOMEgfs +# └── RUNTESTS +# ├── COMROT +# │ └── ${pslot} +# └── EXPDIR +# └── ${pslot} on: workflow_dispatch: @@ -15,17 +26,6 @@ on: - rocky - centos -# TEST_DIR contains 2 directories; -# 1. HOMEgfs: clone of the global-workflow -# 2. RUNTESTS: A directory containing EXPDIR and COMROT for experiments -# e.g. $> tree ./TEST_DIR -# ./TEST_DIR -# ├── HOMEgfs -# └── RUNTESTS -# ├── COMROT -# │ └── ${pslot} -# └── EXPDIR -# └── ${pslot} env: TEST_DIR: ${{ github.workspace }}/${{ github.run_id }} MACHINE_ID: noaacloud @@ -127,4 +127,4 @@ jobs: run: | echo "Cleaning up workspace" rm -rf ${{ env.TEST_DIR }} - \ No newline at end of file + \ No newline at end of file From 3323fb427e9059b0ac73caad41ec209da1c0ec7c Mon Sep 17 00:00:00 2001 From: tmcguinness Date: Fri, 18 Oct 2024 20:46:34 +0000 Subject: [PATCH 17/17] new line at enc of file --- .github/workflows/pw_aws_ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pw_aws_ci.yaml b/.github/workflows/pw_aws_ci.yaml index 3039ca2edb..9772130f8e 100644 --- a/.github/workflows/pw_aws_ci.yaml +++ b/.github/workflows/pw_aws_ci.yaml @@ -127,4 +127,3 @@ jobs: run: | echo "Cleaning up workspace" rm -rf ${{ env.TEST_DIR }} - \ No newline at end of file