From 6e4b089930eff2cd075c70d95450b5b8fa2bc37a Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Mon, 18 Nov 2024 17:42:32 -0800 Subject: [PATCH] Debugging: upgrade all workflows --- .github/workflows/clang_sanitizers.yml | 26 +++++++++++++++--- .github/workflows/clang_tidy.yml | 27 ++++++++++++++++--- .github/workflows/codeql.yml | 21 ++++++++++++++- .github/workflows/cuda.yml | 29 ++++++++++++++++---- .github/workflows/hip.yml | 26 +++++++++++++++--- .github/workflows/insitu.yml | 29 ++++++++++++++++---- .github/workflows/intel.yml | 29 ++++++++++++++++---- .github/workflows/scripts/check_diff.sh | 2 +- .github/workflows/ubuntu.yml | 35 ++++++++++++++++++++----- .github/workflows/windows.yml | 26 +++++++++++++++--- 10 files changed, 211 insertions(+), 39 deletions(-) diff --git a/.github/workflows/clang_sanitizers.yml b/.github/workflows/clang_sanitizers.yml index e89cb676a03..a5610fcfb94 100644 --- a/.github/workflows/clang_sanitizers.yml +++ b/.github/workflows/clang_sanitizers.yml @@ -5,19 +5,36 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-clangsanitizers cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + build_UB_sanitizer: name: Clang UB sanitizer runs-on: ubuntu-22.04 container: ubuntu:23.10 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CC: clang CXX: clang++ @@ -83,7 +100,8 @@ jobs: name: Clang thread sanitizer runs-on: ubuntu-22.04 container: ubuntu:23.10 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CC: clang CXX: clang++ diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index edb3e8b1988..a236b03114b 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -5,14 +5,30 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-clangtidy cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + run_clang_tidy: strategy: matrix: @@ -20,13 +36,17 @@ jobs: name: clang-tidy-${{ matrix.dim }}D runs-on: ubuntu-22.04 timeout-minutes: 180 - if: github.event.pull_request.draft == false + needs: skip_checks + # NOTE if condition must be checked at every step due to matrix structure + #if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - name: install dependencies + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} run: | .github/workflows/dependencies/clang15.sh - name: set up cache + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} uses: actions/cache@v4 with: path: ~/.cache/ccache @@ -34,6 +54,7 @@ jobs: restore-keys: | ccache-${{ github.workflow }}-${{ github.job }}-git- - name: build WarpX & run clang-tidy + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} run: | export CCACHE_COMPRESS=1 export CCACHE_COMPRESSLEVEL=10 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e3549ae340a..6c212b2c208 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,10 +13,29 @@ concurrency: cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + analyze: name: Analyze runs-on: ubuntu-latest - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} permissions: actions: read contents: read diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 8d40aba553c..01226eb4698 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -5,8 +5,6 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-cuda @@ -17,10 +15,29 @@ jobs: # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/ubuntu18.04/10.1/base/Dockerfile # https://github.com/ComputationalRadiationPhysics/picongpu/blob/0.5.0/share/picongpu/dockerfiles/ubuntu-1604/Dockerfile # https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + build_nvcc: name: NVCC 11.3 SP runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXXFLAGS: "-Werror" CMAKE_GENERATOR: Ninja @@ -101,7 +118,8 @@ jobs: build_nvcc_gnumake: name: NVCC 11.8.0 GNUmake runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - name: install dependencies @@ -135,7 +153,8 @@ jobs: build_nvhpc24-1-nvcc: name: NVHPC@24.1 NVCC/NVC++ Release [tests] runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} #env: # # For NVHPC, Ninja is slower than the default: # CMAKE_GENERATOR: Ninja diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 6ab4e4a8401..20ec4de8694 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -5,21 +5,38 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-hip cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + build_hip_3d_sp: name: HIP 3D SP runs-on: ubuntu-20.04 env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - name: install dependencies @@ -78,7 +95,8 @@ jobs: env: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - name: install dependencies diff --git a/.github/workflows/insitu.yml b/.github/workflows/insitu.yml index 50b482d28d3..51f5e9f0863 100644 --- a/.github/workflows/insitu.yml +++ b/.github/workflows/insitu.yml @@ -5,18 +5,35 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-insituvis cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + sensei: name: SENSEI runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXX: clang++ CC: clang @@ -42,7 +59,8 @@ jobs: ascent: name: Ascent runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXX: g++ CC: gcc @@ -82,7 +100,8 @@ jobs: catalyst: name: Catalyst runs-on: ubuntu-22.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXX: g++ CC: gcc diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 9b98c6e5990..d5384926b8f 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -5,8 +5,6 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-intel @@ -15,10 +13,29 @@ concurrency: jobs: # Ref.: https://github.com/rscohn2/oneapi-ci # intel-basekit intel-hpckit are too large in size + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + build_icc: name: oneAPI ICC SP&DP runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} # For oneAPI, Ninja is slower than the default: #env: # CMAKE_GENERATOR: Ninja @@ -86,7 +103,8 @@ 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 + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - name: install dependencies @@ -151,7 +169,8 @@ 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 + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - name: install dependencies diff --git a/.github/workflows/scripts/check_diff.sh b/.github/workflows/scripts/check_diff.sh index 32af0fa8d6d..3099bf2b4fe 100755 --- a/.github/workflows/scripts/check_diff.sh +++ b/.github/workflows/scripts/check_diff.sh @@ -9,7 +9,7 @@ head_ref=${1} base_ref=${2} clone_url=${3} -# Set paths to ignore +# Set paths to ignore (FIXME update this before merging) paths_ignore="^(Docs|\.github)/|\.azure-pipelines\.yml$" # Add forked repository as remote diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bbe20679781..30b025d2c1d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -5,18 +5,35 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + build_cxxminimal: name: GCC Minimal w/o MPI runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXXFLAGS: "-Werror" steps: @@ -54,7 +71,8 @@ jobs: build_1D_2D: name: GCC 1D & 2D w/ MPI, QED tools runs-on: ubuntu-22.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXXFLAGS: "-Werror" CXX: "g++-12" @@ -101,7 +119,8 @@ jobs: build_3D_sp: name: GCC 3D & RZ w/ MPI, single precision runs-on: ubuntu-22.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CXX: "g++-12" CC: "gcc-12" @@ -148,7 +167,8 @@ jobs: build_gcc_ablastr: name: GCC ABLASTR w/o MPI runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CMAKE_GENERATOR: Ninja CXXFLAGS: "-Werror" @@ -184,7 +204,8 @@ jobs: build_pyfull: name: Clang pywarpx runs-on: ubuntu-20.04 - if: github.event.pull_request.draft == false + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} env: CC: clang CXX: clang++ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ae4843e0536..d06a495011f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,20 +5,37 @@ on: branches: - "development" pull_request: - paths-ignore: - - "Docs/**" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-windows cancel-in-progress: true jobs: + + skip_checks: + name: Skip checks? + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run PR analysis script + run: | + .github/workflows/scripts/check_diff.sh \ + ${{ github.event.pull_request.head.ref }} \ + ${{ github.event.pull_request.base.ref }} \ + ${{ github.event.pull_request.head.repo.clone_url }} + outputs: + skip: ${{ env.SKIP_CHECKS }} + build_win_msvc: name: MSVC C++17 w/o MPI runs-on: windows-latest # disabled due to issues in #5230 if: 0 - #if: github.event.pull_request.draft == false + #needs: skip_checks + #if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -69,7 +86,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 + needs: skip_checks + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5