55 branches :
66 - " development"
77 pull_request :
8+ types : [opened, synchronize, reopened, ready_for_review]
89
910concurrency :
1011 group : ${{ github.ref }}-${{ github.head_ref }}-clangtidy
@@ -24,31 +25,33 @@ jobs:
2425 runs-on : ubuntu-24.04
2526 timeout-minutes : 250
2627 needs : check_changes
27- if : ${{ github.event.pull_request.draft == false && needs.check_changes.outputs.has_non_docs_changes == 'true' }}
28+ if : ${{ github.event.pull_request.draft == false }}
2829 steps :
2930 - uses : actions/checkout@v4
31+ if : ${{ needs.check_changes.outputs.has_non_docs_changes == 'true' }}
3032 - name : install dependencies
33+ if : ${{ needs.check_changes.outputs.has_non_docs_changes == 'true' }}
3134 run : |
3235 .github/workflows/dependencies/clang.sh 17
3336 - name : set up cache
37+ if : ${{ needs.check_changes.outputs.has_non_docs_changes == 'true' }}
3438 uses : actions/cache@v4
3539 with :
3640 path : ~/.cache/ccache
3741 key : ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
3842 restore-keys : |
3943 ccache-${{ github.workflow }}-${{ github.job }}-git-
4044 - name : build WarpX & run clang-tidy
45+ if : ${{ needs.check_changes.outputs.has_non_docs_changes == 'true' }}
4146 run : |
4247 export CCACHE_COMPRESS=1
4348 export CCACHE_COMPRESSLEVEL=10
4449 export CCACHE_MAXSIZE=300M
4550 export CCACHE_EXTRAFILES=${{ github.workspace }}/.clang-tidy
4651 export CCACHE_LOGFILE=${{ github.workspace }}/ccache.log.txt
4752 ccache -z
48-
4953 export CXX=$(which clang++-17)
5054 export CC=$(which clang-17)
51-
5255 cmake -S . -B build_clang_tidy \
5356 -DCMAKE_VERBOSE_MAKEFILE=ON \
5457 -DWarpX_DIMS="${{ matrix.dim }}" \
@@ -60,13 +63,10 @@ jobs:
6063 -DWarpX_OPENPMD=ON \
6164 -DWarpX_PRECISION=SINGLE \
6265 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
63-
6466 cmake --build build_clang_tidy -j 4
65-
6667 ${{github.workspace}}/.github/workflows/source/makeMakefileForClangTidy.py --input ${{github.workspace}}/ccache.log.txt
6768 make -j4 --keep-going -f clang-tidy-ccache-misses.mak \
6869 CLANG_TIDY=clang-tidy-17 \
6970 CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
70-
7171 ccache -s
7272 du -hs ~/.cache/ccache
0 commit comments