File tree 3 files changed +64
-3
lines changed
3 files changed +64
-3
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ Checks: >
49
49
-modernize-use-transparent-functors,
50
50
-modernize-use-trailing-return-type,
51
51
-modernize-use-nodiscard,
52
+ -modernize-return-braced-init-list,
53
+ -modernize-type-traits,
52
54
-modernize-avoid-c-arrays,
53
55
-modernize-concat-nested-namespaces,
54
56
use-emplace,
Original file line number Diff line number Diff line change
1
+ name : clang
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ - ' aspect-*'
8
+ # pull_request: disable testing of PRs because it is too slow
9
+
10
+ concurrency :
11
+ group : ${{ github.actor }}-${{ github.ref }}
12
+ cancel-in-progress : true
13
+
14
+ env :
15
+ OMPI_MCA_btl_base_warn_component_unused : 0
16
+ OMPI_MCA_mpi_yield_when_idle : 1
17
+ OMPI_MCA_rmaps_base_oversubscribe : 1
18
+ OMPI_ALLOW_RUN_AS_ROOT : 1
19
+ OMPI_ALLOW_RUN_AS_ROOT_CONFIRM : 1
20
+ OMPI_MCA_btl_vader_single_copy_mechanism : none
21
+
22
+ jobs :
23
+ tidy :
24
+ # run clang-tidy
25
+ name : tidy
26
+ runs-on : [ubuntu-latest]
27
+ strategy :
28
+ fail-fast : false
29
+ matrix :
30
+ include :
31
+ - image : " geodynamics/aspect-tester:noble-dealii-master-clang"
32
+ result-file : " clang-tidy-results.txt"
33
+ container-options : ' --user 0 --name container'
34
+
35
+ container :
36
+ image : ${{ matrix.image }}
37
+ options : ${{ matrix.container-options }}
38
+
39
+ steps :
40
+ - uses : actions/checkout@v4
41
+ - name : clang-tidy
42
+ run : |
43
+ mkdir build
44
+ cd build
45
+ ../contrib/utilities/run_clang_tidy.sh $PWD/..
46
+ mv output.txt ${{ matrix.result-file }}
47
+ - name : compile
48
+ run : |
49
+ cd build
50
+ cmake -D CMAKE_CXX_FLAGS='-Werror' .
51
+ make -j 2
52
+ - name : test
53
+ run : |
54
+ cd build
55
+ ./aspect --test
56
+ - name : archive test results
57
+ uses : actions/upload-artifact@v4
58
+ with :
59
+ name : ${{ matrix.result-file }}
60
+ path : build/${{ matrix.result-file }}
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ if test ! -d "$SRC/source" -o ! -d "$SRC/include" -o ! -f "$SRC/CMakeLists.txt"
54
54
exit 1
55
55
fi
56
56
57
- if ! [ -x " $( command -v run-clang-tidy.py ) " ] || ! [ -x " $( command -v clang++) " ]; then
57
+ if ! [ -x " $( command -v run-clang-tidy) " ] || ! [ -x " $( command -v clang++) " ]; then
58
58
echo " Error: Either the 'run-clang-tidy.py' or the 'clang++' program could not be found."
59
59
echo " Make sure 'clang', 'clang++', and 'run-clang-tidy.py' (part of clang) are in the path."
60
60
exit 2
@@ -81,7 +81,7 @@ CC=clang CXX=clang++ cmake "${ARGS[@]}" "$SRC" || (echo "cmake failed!"; false)
81
81
# finally run it:
82
82
# pipe away stderr (just contains nonsensical "x warnings generated")
83
83
# pipe output to output.txt
84
- run-clang-tidy.py -p . -quiet -header-filter=" $SRC /include/*" 2> error.txt > output.txt
84
+ run-clang-tidy -p . -quiet -header-filter=" $SRC /include/*" 2> error.txt > output.txt
85
85
86
86
if grep -E -q ' (warning|error): ' output.txt; then
87
87
grep -E ' (warning|error): ' output.txt
90
90
91
91
echo " OK"
92
92
exit 0
93
-
You can’t perform that action at this time.
0 commit comments