Skip to content

Commit

Permalink
Fix all workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 19, 2024
1 parent 4094c1f commit bc0520b
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 65 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/clang_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down Expand Up @@ -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++
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -24,25 +35,25 @@ 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
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
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
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,29 @@ 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
env:
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
Expand Down Expand Up @@ -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
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/insitu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scripts/check_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}

Expand Down
Loading

0 comments on commit bc0520b

Please sign in to comment.