From bc0520b42d4561e1bff75a0e0b6a30dc2d9cde81 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Tue, 19 Nov 2024 15:02:59 -0800 Subject: [PATCH] Fix all workflows --- .github/workflows/clang_sanitizers.yml | 23 +++++++++++++++----- .github/workflows/clang_tidy.yml | 29 +++++++++++++++++-------- .github/workflows/codeql.yml | 21 +++++++++++++----- .github/workflows/cuda.yml | 25 +++++++++++++++------ .github/workflows/hip.yml | 23 +++++++++++++++----- .github/workflows/insitu.yml | 25 +++++++++++++++------ .github/workflows/intel.yml | 25 +++++++++++++++------ .github/workflows/macos.yml | 2 +- .github/workflows/scripts/check_diff.sh | 4 ++-- .github/workflows/ubuntu.yml | 29 +++++++++++++++++-------- .github/workflows/windows.yml | 23 +++++++++++++++----- 11 files changed, 164 insertions(+), 65 deletions(-) diff --git a/.github/workflows/clang_sanitizers.yml b/.github/workflows/clang_sanitizers.yml index 27e99d2bac2..e75651aeef0 100644 --- a/.github/workflows/clang_sanitizers.yml +++ b/.github/workflows/clang_sanitizers.yml @@ -12,16 +12,27 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CC: clang CXX: clang++ @@ -80,7 +91,7 @@ jobs: runs-on: ubuntu-22.04 container: ubuntu:23.10 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + 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 2f981041ed8..bc38619d1c1 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -12,10 +12,21 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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: @@ -24,17 +35,17 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 180 needs: skip_checks - if: ${{ github.event.pull_request.draft == false }} + if: ${{ github.event.pull_request.draft == "false" }} steps: - name: Checkout code - if: ${{ needs.skip_checks.outputs.skip == false }} + if: ${{ needs.skip_checks.outputs.skip == "false" }} uses: actions/checkout@v4 - name: Install dependencies - if: ${{ needs.skip_checks.outputs.skip == false }} + if: ${{ needs.skip_checks.outputs.skip == "false" }} run: | .github/workflows/dependencies/clang15.sh - name: Set up cache - if: ${{ needs.skip_checks.outputs.skip == false }} + if: ${{ needs.skip_checks.outputs.skip == "false" }} uses: actions/cache@v4 with: path: ~/.cache/ccache @@ -42,7 +53,7 @@ jobs: restore-keys: | ccache-${{ github.workflow }}-${{ github.job }}-git- - name: Build WarpX & run clang-tidy - if: ${{ needs.skip_checks.outputs.skip == false }} + if: ${{ 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 26d13a24317..ab48e8a4dd4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,15 +14,26 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + 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 11c4942fd0c..896b4c3c5e9 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -16,15 +16,26 @@ jobs: # 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: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CXXFLAGS: "-Werror" CMAKE_GENERATOR: Ninja @@ -99,7 +110,7 @@ jobs: name: NVCC 11.8.0 GNUmake runs-on: ubuntu-20.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -131,7 +142,7 @@ jobs: name: NVHPC@24.1 NVCC/NVC++ Release [tests] runs-on: ubuntu-20.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + 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 36cc2a14d3c..36c850b2724 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -12,10 +12,21 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 @@ -23,7 +34,7 @@ jobs: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -78,7 +89,7 @@ jobs: CXXFLAGS: "-Werror -Wno-deprecated-declarations -Wno-error=pass-failed" CMAKE_GENERATOR: Ninja needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/insitu.yml b/.github/workflows/insitu.yml index a63c72bf59e..b0c7847a779 100644 --- a/.github/workflows/insitu.yml +++ b/.github/workflows/insitu.yml @@ -12,15 +12,26 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CXX: clang++ CC: clang @@ -47,7 +58,7 @@ jobs: name: Ascent runs-on: ubuntu-20.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CXX: g++ CC: gcc @@ -88,7 +99,7 @@ jobs: name: Catalyst runs-on: ubuntu-22.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + 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 3f0d6e341e2..3b4cabab6e2 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -14,15 +14,26 @@ jobs: # Ref.: https://github.com/rscohn2/oneapi-ci # intel-basekit intel-hpckit are too large in size skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + 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 +97,7 @@ jobs: # For oneAPI, Ninja is slower than the default: # CMAKE_GENERATOR: Ninja needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -147,7 +158,7 @@ jobs: # For oneAPI, Ninja is slower than the default: # CMAKE_GENERATOR: Ninja needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f06911d3ff8..6b6130c6520 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -31,7 +31,7 @@ jobs: name: AppleClang runs-on: macos-latest needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == 'false' }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: TRUE # For macOS, Ninja is slower than the default: diff --git a/.github/workflows/scripts/check_diff.sh b/.github/workflows/scripts/check_diff.sh index 266035a4368..15342e5a4c8 100755 --- a/.github/workflows/scripts/check_diff.sh +++ b/.github/workflows/scripts/check_diff.sh @@ -24,8 +24,8 @@ cat check_diff.txt # Set paths to ignore paths_ignore=() paths_ignore+=("Docs/") -#paths_ignore+=(".github/") -#paths_ignore+=(".azure-pipelines.yml") +paths_ignore+=(".github/") +paths_ignore+=(".azure-pipelines.yml") echo "Paths to ignore:" echo ${paths_ignore[@]} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index c6b7a7d2105..d43137b0cfa 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -12,15 +12,26 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest + name: Analyze PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CXXFLAGS: "-Werror" steps: @@ -57,7 +68,7 @@ jobs: name: GCC 1D & 2D w/ MPI, QED tools runs-on: ubuntu-22.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CXXFLAGS: "-Werror" CXX: "g++-12" @@ -101,7 +112,7 @@ jobs: name: GCC 3D & RZ w/ MPI, single precision runs-on: ubuntu-22.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CXX: "g++-12" CC: "gcc-12" @@ -145,7 +156,7 @@ jobs: name: GCC ABLASTR w/o MPI runs-on: ubuntu-20.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} env: CMAKE_GENERATOR: Ninja CXXFLAGS: "-Werror" @@ -180,7 +191,7 @@ jobs: name: Clang pywarpx runs-on: ubuntu-20.04 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + 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 66a0a405342..78120bcda3f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,17 +12,28 @@ concurrency: jobs: skip_checks: - name: Analyze - uses: ./.github/workflows/skip_checks.yml - with: - runs-on: ubuntu-latest # does not need to be windows + name: Analyze PR + runs-on: ubuntu-latest # does not need to be Windows + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Skip checks? + 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 needs: skip_checks # disabled due to issues in #5230 if: 0 - #if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + #if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -72,7 +83,7 @@ jobs: name: Clang C++17 w/ OMP w/o MPI runs-on: windows-2019 needs: skip_checks - if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }} + if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == "false" }} steps: - name: Checkout code uses: actions/checkout@v4