From df914d04765d24622b885c778fb0a909daadb94a Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 09:59:31 +0100 Subject: [PATCH 01/21] Only run tarball action in the merge_queue and nightly --- .github/workflows/tests_cmake_testsuite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 19396d3662..162db6a087 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -138,7 +138,7 @@ jobs: TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. t8code_tarball: - if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') + if: (github.event_name == 'schedule' || github.event_name == 'merge_group') && github.repository == 'DLR-AMR/t8code' uses: ./.github/workflows/build_cmake_tarball.yml needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests] with: From a8827563bd03991123d8403c117c060ccb6671d4 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 12:43:58 +0100 Subject: [PATCH 02/21] deactivate testsuite on push into main. Testsuite has already run in the merge queue. scheduled tests on main are still active. --- .github/workflows/check_indentation.yml | 3 --- .github/workflows/spell_check.yml | 3 --- .github/workflows/tests_cmake_testsuite.yml | 3 --- 3 files changed, 9 deletions(-) diff --git a/.github/workflows/check_indentation.yml b/.github/workflows/check_indentation.yml index 592b4c5ee7..441040dd1d 100644 --- a/.github/workflows/check_indentation.yml +++ b/.github/workflows/check_indentation.yml @@ -32,9 +32,6 @@ name: t8code indentation check on: merge_group: - push: - branches: - - main pull_request: workflow_dispatch: # Be able to trigger this manually on github.com # Run every night at 1:05 diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml index 4a48f11860..8c79d94bb5 100644 --- a/.github/workflows/spell_check.yml +++ b/.github/workflows/spell_check.yml @@ -2,9 +2,6 @@ name: spell_check on: merge_group: - push: - branches: - - main pull_request: workflow_dispatch: # Be able to trigger this manually on github.com diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 162db6a087..59f78e2fc7 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -32,9 +32,6 @@ name: t8code CMake testsuite on: merge_group: - push: - branches: - - main pull_request: workflow_dispatch: # Be able to trigger this manually on github.com # Run every night at 1:10 From c47b6700f6215b1f670dd4de1da4b5cf8b9c1055 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:29:16 +0100 Subject: [PATCH 03/21] Document fine grained trigger --- .github/workflows/tests_cmake_testsuite.yml | 59 +++++++++++++++++---- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 59f78e2fc7..df0bc6e558 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -38,10 +38,53 @@ on: schedule: - cron: '10 1 * * *' +# The CI pipeline should: +# - fully run in the merge queue with the full test suite +# - not run on Draft PRs +# - run on Draft PRs, IF the latest commit message contains '[run CI]' +# - run on scheduled runs for the DLR-AMR/t8code repository +# - run on all other pull request events +# These conditions are checked in the fine_grained_trigger job. If it completes successfully, it triggers the preparation job, +# which triggers the actual tests. +# The job to build the tarball is only triggered on merge_group events for the DLR-AMR/t8code repository. + jobs: + fine_grained_trigger: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + - name: get the latest commit message + run: | + latest_commit_message=$(git log -1 --pretty=%B) + echo "Latest commit message: $latest_commit_message" + - name: trigger the testsuite + run: | + if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then + echo "Not a draft PR, proceeding with CI." + exit 0 + elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then + echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." + exit 0 + elif [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then + echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." + exit 0 + elif [[ "${{ github.event_name }}" != "schedule" ]]; then + echo "Event is not schedule, proceeding with CI." + exit 0 + else + echo "Conditions not met, skipping CI." + exit 1 + fi + + + # Preparation step for tests. Repo is cloned and sc + p4est are compiled with and without MPI. preparation: - if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') + needs: [fine_grained_trigger] uses: ./.github/workflows/tests_cmake_preparation.yml strategy: fail-fast: false @@ -57,7 +100,6 @@ jobs: # Run parallel tests for sc and p4est with and without MPI sc_p4est_tests: - if: ((github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule')) needs: preparation uses: ./.github/workflows/tests_cmake_sc_p4est.yml strategy: @@ -72,7 +114,7 @@ jobs: # Run t8code tests with and without MPI and in serial and debug mode t8code_tests: - if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') + needs: preparation uses: ./.github/workflows/tests_cmake_t8code.yml strategy: fail-fast: false @@ -81,7 +123,6 @@ jobs: BUILD_TYPE: [Debug, Release] include: - MAKEFLAGS: -j4 - needs: preparation with: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} MPI: ${{ matrix.MPI }} @@ -90,7 +131,7 @@ jobs: # Run t8code linkage tests with and without MPI and in serial and debug mode t8code_linkage_tests: - if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') + needs: preparation uses: ./.github/workflows/tests_cmake_t8code_linkage.yml strategy: fail-fast: false @@ -99,7 +140,6 @@ jobs: BUILD_TYPE: [Debug, Release] include: - MAKEFLAGS: -j4 - needs: preparation with: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} MPI: ${{ matrix.MPI }} @@ -108,7 +148,7 @@ jobs: # Run t8code linkage tests with and without MPI and in serial and debug mode t8code_api_tests: - if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') + needs: preparation uses: ./.github/workflows/tests_cmake_t8code_api.yml strategy: fail-fast: false @@ -117,7 +157,6 @@ jobs: BUILD_TYPE: [Debug, Release] include: - MAKEFLAGS: -j4 - needs: preparation with: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} MPI: ${{ matrix.MPI }} @@ -126,7 +165,7 @@ jobs: # Run t8code tests with shipped submodules. This test is only for the build system, so only one config is tested. t8code_w_shipped_submodules_tests: - if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') + needs: fine_grained_trigger uses: ./.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml with: MAKEFLAGS: -j4 @@ -135,7 +174,7 @@ jobs: TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. t8code_tarball: - if: (github.event_name == 'schedule' || github.event_name == 'merge_group') && github.repository == 'DLR-AMR/t8code' + if: github.event_name == 'merge_group' && github.repository == 'DLR-AMR/t8code' uses: ./.github/workflows/build_cmake_tarball.yml needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests] with: From 5822dd5a58edf76d66a5cf62fd80c1d08fc0ccec Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:38:21 +0100 Subject: [PATCH 04/21] reorganize fine-grained conditions --- .github/workflows/tests_cmake_testsuite.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index df0bc6e558..ee8d6723ec 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -63,18 +63,18 @@ jobs: echo "Latest commit message: $latest_commit_message" - name: trigger the testsuite run: | - if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then - echo "Not a draft PR, proceeding with CI." - exit 0 - elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then - echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." - exit 0 - elif [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then + if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." exit 0 - elif [[ "${{ github.event_name }}" != "schedule" ]]; then - echo "Event is not schedule, proceeding with CI." - exit 0 + fi + if [["${{ github.event_name }}" != "schedule" ]]; then + if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then + echo "Not a draft PR, proceeding with CI." + exit 0 + elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then + echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." + exit 0 + fi else echo "Conditions not met, skipping CI." exit 1 From a1a001989ecf85696703f71a6ef70286e25f58da Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:41:44 +0100 Subject: [PATCH 05/21] fix missing space --- .github/workflows/tests_cmake_testsuite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index ee8d6723ec..1e7b939088 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -67,7 +67,7 @@ jobs: echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." exit 0 fi - if [["${{ github.event_name }}" != "schedule" ]]; then + if [[ "${{ github.event_name }}" != "schedule" ]]; then if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then echo "Not a draft PR, proceeding with CI." exit 0 From e4721537787a826e089911a5688e1af573b17aee Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:42:14 +0100 Subject: [PATCH 06/21] [run CI] From 8d9bd634965f8cbde1be5ff8384bf608baa7d18f Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:50:12 +0100 Subject: [PATCH 07/21] Get commit message in other step --- .github/workflows/tests_cmake_testsuite.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 1e7b939088..386b4bab30 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -57,21 +57,19 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 - - name: get the latest commit message - run: | - latest_commit_message=$(git log -1 --pretty=%B) - echo "Latest commit message: $latest_commit_message" - name: trigger the testsuite run: | if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." exit 0 fi + latest_commit_message=$(git log -1 --pretty=%B) + echo "Latest commit message: $latest_commit_message" if [[ "${{ github.event_name }}" != "schedule" ]]; then if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then echo "Not a draft PR, proceeding with CI." exit 0 - elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then + elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." exit 0 fi From 5e78e6108023bb32ddc9f4a270883607bed6c5b3 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:52:18 +0100 Subject: [PATCH 08/21] Add else blog --- .github/workflows/tests_cmake_testsuite.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 386b4bab30..911085ec79 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -69,9 +69,12 @@ jobs: if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then echo "Not a draft PR, proceeding with CI." exit 0 - elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then + elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." exit 0 + else + echo "Draft PR without '[run CI]' in the latest commit message, skipping CI." + exit 1 fi else echo "Conditions not met, skipping CI." From 39dc0bd32268b2d066c2bad2ad3cb7f13568bda8 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 13:55:44 +0100 Subject: [PATCH 09/21] [run CI] From a1d3a77c1960c1f5d92d0ff8f3245532c6621295 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:06:52 +0100 Subject: [PATCH 10/21] Do not construct tarball on draft PRs --- .github/workflows/tests_cmake_testsuite.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 911085ec79..709f9baa54 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -175,7 +175,6 @@ jobs: TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. t8code_tarball: - if: github.event_name == 'merge_group' && github.repository == 'DLR-AMR/t8code' uses: ./.github/workflows/build_cmake_tarball.yml needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests] with: From 635868726078593e680da2fa85e00e081abcbf91 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:15:50 +0100 Subject: [PATCH 11/21] Do not fail the action if the CI should be skipped --- .github/workflows/tests_cmake_testsuite.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 709f9baa54..dc6b8c74f0 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -51,16 +51,20 @@ on: jobs: fine_grained_trigger: runs-on: ubuntu-latest + outputs: + run_ci: ${{ steps.set_run_ci.outputs.RUN_CI }} steps: - uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 - - name: trigger the testsuite + - name: set the run_ci variable for the testsuite + id: set_run_ci run: | if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." + echo "RUN_CI=true" >> $GITHUB_ENV exit 0 fi latest_commit_message=$(git log -1 --pretty=%B) @@ -68,17 +72,21 @@ jobs: if [[ "${{ github.event_name }}" != "schedule" ]]; then if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then echo "Not a draft PR, proceeding with CI." + echo "RUN_CI=true" >> $GITHUB_ENV exit 0 elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." + echo "RUN_CI=true" >> $GITHUB_ENV exit 0 else echo "Draft PR without '[run CI]' in the latest commit message, skipping CI." - exit 1 + echo "RUN_CI=false" >> $GITHUB_ENV + exit 0 fi else echo "Conditions not met, skipping CI." - exit 1 + echo "RUN_CI=false" >> $GITHUB_ENV + exit 0 fi @@ -86,6 +94,8 @@ jobs: # Preparation step for tests. Repo is cloned and sc + p4est are compiled with and without MPI. preparation: needs: [fine_grained_trigger] + secrets: inherit + if: ${{ needs.fine_grained_trigger.outputs.run_ci == 'true' }} uses: ./.github/workflows/tests_cmake_preparation.yml strategy: fail-fast: false @@ -175,6 +185,7 @@ jobs: TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. t8code_tarball: + if: github.event.pull_request == false uses: ./.github/workflows/build_cmake_tarball.yml needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests] with: From 4df7542f1fba5296ada6d11d6e1877be6fad7cee Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:17:46 +0100 Subject: [PATCH 12/21] use run_ci variable in shipped submodule test, too forgot to add it. --- .github/workflows/tests_cmake_testsuite.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index dc6b8c74f0..f14e6cfa13 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -177,6 +177,8 @@ jobs: # Run t8code tests with shipped submodules. This test is only for the build system, so only one config is tested. t8code_w_shipped_submodules_tests: needs: fine_grained_trigger + secrets: inherit + if: ${{ needs.fine_grained_trigger.outputs.run_ci == 'true' }} uses: ./.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml with: MAKEFLAGS: -j4 From 27408ae9fdeb485c51785adc9a114607e4aa8fd6 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:19:09 +0100 Subject: [PATCH 13/21] [run CI] From 166e63284643a486e99c6531f1f49cd00196935b Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:26:47 +0100 Subject: [PATCH 14/21] remove {} arround condition --- .github/workflows/tests_cmake_testsuite.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index f14e6cfa13..182ebbd4fa 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -49,6 +49,7 @@ on: # The job to build the tarball is only triggered on merge_group events for the DLR-AMR/t8code repository. jobs: + fine_grained_trigger: runs-on: ubuntu-latest outputs: @@ -59,7 +60,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 - - name: set the run_ci variable for the testsuite + - name: set the run_ci variable for the testsute id: set_run_ci run: | if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then @@ -89,13 +90,11 @@ jobs: exit 0 fi - - # Preparation step for tests. Repo is cloned and sc + p4est are compiled with and without MPI. preparation: needs: [fine_grained_trigger] secrets: inherit - if: ${{ needs.fine_grained_trigger.outputs.run_ci == 'true' }} + if: needs.fine_grained_trigger.outputs.run_ci == 'true' uses: ./.github/workflows/tests_cmake_preparation.yml strategy: fail-fast: false From 76fe9a3f2e8184fb3be320e63e18cce490234f1e Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:27:39 +0100 Subject: [PATCH 15/21] [run CI] From 6e22cf5af9eaef76ff237ffe1677c42e6d48f22b Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:30:04 +0100 Subject: [PATCH 16/21] write variable to GITHUB_OUTPUT not to GITHUB_ENV --- .github/workflows/tests_cmake_testsuite.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 182ebbd4fa..1aee90afc8 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -65,7 +65,7 @@ jobs: run: | if [[ "${{ github.event_name }}" == "schedule" && "${{ github.repository }}" == "DLR-AMR/t8code" ]]; then echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." - echo "RUN_CI=true" >> $GITHUB_ENV + echo "RUN_CI=true" >> $GITHUB_OUTPUT exit 0 fi latest_commit_message=$(git log -1 --pretty=%B) @@ -73,20 +73,20 @@ jobs: if [[ "${{ github.event_name }}" != "schedule" ]]; then if [[ "${{ github.event.pull_request.draft }}" == "false" ]]; then echo "Not a draft PR, proceeding with CI." - echo "RUN_CI=true" >> $GITHUB_ENV + echo "RUN_CI=true" >> $GITHUB_OUTPUT exit 0 elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." - echo "RUN_CI=true" >> $GITHUB_ENV + echo "RUN_CI=true" >> $GITHUB_OUTPUT exit 0 else echo "Draft PR without '[run CI]' in the latest commit message, skipping CI." - echo "RUN_CI=false" >> $GITHUB_ENV + echo "RUN_CI=false" >> $GITHUB_OUTPUT exit 0 fi else echo "Conditions not met, skipping CI." - echo "RUN_CI=false" >> $GITHUB_ENV + echo "RUN_CI=false" >> $GITHUB_OUTPUT exit 0 fi From b3bed22627d08ba33aa1d2173d83a4a0ec974dcb Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:30:27 +0100 Subject: [PATCH 17/21] [run CI] From 569bfdfa772f9d8b824cfa2022ee2c8192d32806 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:47:26 +0100 Subject: [PATCH 18/21] Apply suggestions from code review Co-authored-by: Sandro Elsweijer <49643115+sandro-elsweijer@users.noreply.github.com> --- .github/workflows/tests_cmake_testsuite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 1aee90afc8..fadc05b67e 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -40,8 +40,8 @@ on: # The CI pipeline should: # - fully run in the merge queue with the full test suite -# - not run on Draft PRs -# - run on Draft PRs, IF the latest commit message contains '[run CI]' +# - not run on draft PRs +# - run on draft PRs, if the latest commit message contains '[run CI]' # - run on scheduled runs for the DLR-AMR/t8code repository # - run on all other pull request events # These conditions are checked in the fine_grained_trigger job. If it completes successfully, it triggers the preparation job, From 352f8900f1f1bf32c302af85f1b698bbf7bd0342 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 15:49:00 +0100 Subject: [PATCH 19/21] run CI -> run ci --- .github/workflows/tests_cmake_testsuite.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index fadc05b67e..61898b679f 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -41,7 +41,7 @@ on: # The CI pipeline should: # - fully run in the merge queue with the full test suite # - not run on draft PRs -# - run on draft PRs, if the latest commit message contains '[run CI]' +# - run on draft PRs, if the latest commit message contains '[run ci]' # - run on scheduled runs for the DLR-AMR/t8code repository # - run on all other pull request events # These conditions are checked in the fine_grained_trigger job. If it completes successfully, it triggers the preparation job, @@ -75,12 +75,12 @@ jobs: echo "Not a draft PR, proceeding with CI." echo "RUN_CI=true" >> $GITHUB_OUTPUT exit 0 - elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run CI]"* ]]; then - echo "Draft PR with '[run CI]' in the latest commit message, proceeding with CI." + elif [[ "${{ github.event.pull_request.draft }}" == "true" && "$latest_commit_message" == *"[run ci]"* ]]; then + echo "Draft PR with '[run ci]' in the latest commit message, proceeding with CI." echo "RUN_CI=true" >> $GITHUB_OUTPUT exit 0 else - echo "Draft PR without '[run CI]' in the latest commit message, skipping CI." + echo "Draft PR without '[run ci]' in the latest commit message, skipping CI." echo "RUN_CI=false" >> $GITHUB_OUTPUT exit 0 fi From 0b793e65b4fb31d49a58df3c39d96ef6d0f48ad1 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Tue, 25 Feb 2025 21:05:12 +0100 Subject: [PATCH 20/21] Aktualisieren von tests_cmake_testsuite.yml --- .github/workflows/tests_cmake_testsuite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 61898b679f..58e35e3226 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -186,7 +186,7 @@ jobs: TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. t8code_tarball: - if: github.event.pull_request == false + if: github.event.pull_request.draft == false uses: ./.github/workflows/build_cmake_tarball.yml needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests] with: From 275915086e231ac6309b3f28e12fdedf9a4df1d8 Mon Sep 17 00:00:00 2001 From: David Knapp Date: Wed, 26 Feb 2025 09:59:32 +0100 Subject: [PATCH 21/21] Add merge_group case --- .github/workflows/tests_cmake_testsuite.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index 61898b679f..ea55536ac2 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -67,6 +67,10 @@ jobs: echo "Scheduled run for DLR-AMR/t8code, proceeding with CI." echo "RUN_CI=true" >> $GITHUB_OUTPUT exit 0 + elif [[ "${{ github.event_name }}" == "merge_group" ]]; then + echo "Merge group event, proceeding with CI." + echo "RUN_CI=true" >> $GITHUB_OUTPUT + exit 0 fi latest_commit_message=$(git log -1 --pretty=%B) echo "Latest commit message: $latest_commit_message"