From 8699c07aa7a7f0013cc5593aaa11eddfb7ac1b93 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Fri, 15 Nov 2024 17:28:51 -0800 Subject: [PATCH] Test skipping more workflows --- .github/workflows/check_diff.yml | 12 ++++++------ .github/workflows/clang_sanitizers.yml | 9 ++++++--- .github/workflows/clang_tidy.yml | 7 +++++-- .github/workflows/codeql.yml | 11 +++++++---- .github/workflows/cuda.yml | 6 +++--- .github/workflows/hip.yml | 9 ++++++--- .github/workflows/insitu.yml | 11 +++++++---- .github/workflows/intel.yml | 11 +++++++---- .github/workflows/macos.yml | 7 +++++-- .github/workflows/ubuntu.yml | 15 +++++++++------ .github/workflows/windows.yml | 10 +++++++--- 11 files changed, 68 insertions(+), 40 deletions(-) diff --git a/.github/workflows/check_diff.yml b/.github/workflows/check_diff.yml index f4ea37aec9e..0ad45067297 100644 --- a/.github/workflows/check_diff.yml +++ b/.github/workflows/check_diff.yml @@ -1,7 +1,9 @@ -name: Check changed files +name: PR analysis on: pull_request: + branches: + - development concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-checkdiff @@ -9,6 +11,7 @@ concurrency: jobs: check_diff: + name: Check files changed runs-on: ubuntu-20.04 steps: - name: Checkout code @@ -19,9 +22,6 @@ jobs: env: BASE_REF: ${{ github.event.pull_request.base.ref }} HEAD_REF: ${{ github.event.pull_request.head.ref }} - run: | - echo "Base ref: ${BASE_REF}" - echo "Head ref: ${HEAD_REF}" - name: Add forked repository as remote run: | git remote add fork ${{ github.event.pull_request.head.repo.clone_url }} @@ -31,13 +31,13 @@ jobs: - name: Fetch head branch from forked repository run: | git fetch fork ${HEAD_REF} - - name: Get changed files + - name: Get files changed env: BASE_REF: ${{ github.event.pull_request.base.ref }} HEAD_REF: ${{ github.event.pull_request.head.ref }} run: | git diff --name-only --diff-filter=ACMRTUXB origin/${BASE_REF}..fork/${HEAD_REF} > check_diff.txt - - name: Check changed files + - name: Check files changed run: | if grep -v -E "^(docs|\.github)/" check_diff.txt; then echo "skip=false" >> ${GITHUB_OUTPUT} diff --git a/.github/workflows/clang_sanitizers.yml b/.github/workflows/clang_sanitizers.yml index 067488911bb..d38514f82a5 100644 --- a/.github/workflows/clang_sanitizers.yml +++ b/.github/workflows/clang_sanitizers.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-clangsanitizers @@ -15,7 +18,7 @@ jobs: name: Clang UB sanitizer runs-on: ubuntu-22.04 container: ubuntu:23.10 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CC: clang CXX: clang++ @@ -81,7 +84,7 @@ jobs: name: Clang thread sanitizer runs-on: ubuntu-22.04 container: ubuntu:23.10 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CC: clang CXX: clang++ diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index 9088e3af134..37b87208eba 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-clangtidy @@ -18,7 +21,7 @@ jobs: name: clang-tidy-${{ matrix.dim }}D runs-on: ubuntu-22.04 timeout-minutes: 180 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - name: install dependencies diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e3549ae340a..0221f374422 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,12 @@ name: 🔍 CodeQL on: push: - branches: [ "development" ] - pull_request: - branches: [ "development" ] + branches: + - "development" + workflow_run: + workflows: [PR analysis] + types: + - completed schedule: - cron: "27 3 * * 0" @@ -16,7 +19,7 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} permissions: actions: read contents: read diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index e34edee2e2d..d9c4b434670 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -4,10 +4,10 @@ on: push: branches: - "development" - pull_request: workflow_run: - workflows: [Check changed files] - types: [completed] + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-cuda diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 12513caa19a..d4e8b8d1217 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-hip @@ -17,7 +20,7 @@ jobs: env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - name: install dependencies @@ -77,7 +80,7 @@ jobs: env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - name: install dependencies diff --git a/.github/workflows/insitu.yml b/.github/workflows/insitu.yml index 0cc6a1ced5e..5de2583b223 100644 --- a/.github/workflows/insitu.yml +++ b/.github/workflows/insitu.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-insituvis @@ -14,7 +17,7 @@ jobs: sensei: name: SENSEI runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXX: clang++ CC: clang @@ -40,7 +43,7 @@ jobs: ascent: name: Ascent runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXX: g++ CC: gcc @@ -80,7 +83,7 @@ jobs: catalyst: name: Catalyst runs-on: ubuntu-22.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXX: g++ CC: gcc diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index f27181c2e20..f070d256ba6 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-intel @@ -16,7 +19,7 @@ jobs: build_icc: name: oneAPI ICC SP&DP runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} # For oneAPI, Ninja is slower than the default: #env: # CMAKE_GENERATOR: Ninja @@ -84,7 +87,7 @@ jobs: CXXFLAGS: "-Werror -Wno-error=pass-failed -Wno-tautological-constant-compare" # For oneAPI, Ninja is slower than the default: # CMAKE_GENERATOR: Ninja - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - name: install dependencies @@ -148,7 +151,7 @@ jobs: CXXFLAGS: "-Werror -Wno-tautological-constant-compare" # For oneAPI, Ninja is slower than the default: # CMAKE_GENERATOR: Ninja - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - name: install dependencies diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0afaf6ea451..d1a80312e54 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-macos @@ -14,7 +17,7 @@ jobs: build_appleclang: name: AppleClang runs-on: macos-latest - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXXFLAGS: "-Werror -Wno-error=pass-failed" HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: TRUE diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 6435ed7e66a..e029eeee548 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu @@ -14,7 +17,7 @@ jobs: build_cxxminimal: name: GCC Minimal w/o MPI runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXXFLAGS: "-Werror" steps: @@ -52,7 +55,7 @@ jobs: build_1D_2D: name: GCC 1D & 2D w/ MPI, QED tools runs-on: ubuntu-22.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXXFLAGS: "-Werror" CXX: "g++-12" @@ -99,7 +102,7 @@ jobs: build_3D_sp: name: GCC 3D & RZ w/ MPI, single precision runs-on: ubuntu-22.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CXX: "g++-12" CC: "gcc-12" @@ -146,7 +149,7 @@ jobs: build_gcc_ablastr: name: GCC ABLASTR w/o MPI runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CMAKE_GENERATOR: Ninja CXXFLAGS: "-Werror" @@ -182,7 +185,7 @@ jobs: build_pyfull: name: Clang pywarpx runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} env: CC: clang CXX: clang++ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1d8b0fd0495..0df93cef6d4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -4,7 +4,10 @@ on: push: branches: - "development" - pull_request: + workflow_run: + workflows: [PR analysis] + types: + - completed concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-windows @@ -16,7 +19,7 @@ jobs: runs-on: windows-latest # disabled due to issues in #5230 if: 0 - #if: github.event.pull_request.draft == false + #if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -67,7 +70,8 @@ jobs: build_win_clang: name: Clang C++17 w/ OMP w/o MPI runs-on: windows-2019 - if: github.event.pull_request.draft == false + if: 0 + #if: ${{ github.event.pull_request.draft == false && github.event.workflow_run.outputs.skip == "false" }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5