aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/woodpecker/analysis.sh17
-rw-r--r--etc/woodpecker/analysis.yml2
-rw-r--r--etc/woodpecker/build.yml2
3 files changed, 12 insertions, 9 deletions
diff --git a/etc/woodpecker/analysis.sh b/etc/woodpecker/analysis.sh
index 330d140..5a227ce 100755
--- a/etc/woodpecker/analysis.sh
+++ b/etc/woodpecker/analysis.sh
@@ -1,21 +1,24 @@
#!/bin/sh -e
std="c99"
+NProc=$(( $(nproc) / 4 ))
+if [ -z "$NProc" ] || [ "$NProc" -lt 1 ]; then NProc="1"; fi
run_cppcheck() {
cppcheck --std="$std" --enable=performance,portability \
--force --quiet --inline-suppr --error-exitcode=1 \
- --max-ctu-depth=8 -j"$(nproc)" \
- $(make OPT_DEP_DEFAULT="$1" dump_cppflags) \
+ --max-ctu-depth=8 -j"$NProc" \
+ $(make OPT_DEP_DEFAULT="$1" dump_cppflags) -DDEBUG \
--suppress=varFuncNullUB --suppress=uninitvar \
- *.c
+ $(git ls-files *.c)
}
run_tidy() {
checks="$(sed '/^#/d' etc/woodpecker/clang-tidy-checks | paste -d ',' -s)"
- clang-tidy --warnings-as-errors="*" --checks="$checks" --quiet *.c \
- -- -std="$std" $(make OPT_DEP_DEFAULT="$1" dump_cppflags)
+ git ls-files *.c | xargs -P"$NProc" -I{} clang-tidy --quiet \
+ --warnings-as-errors="*" --checks="$checks" {} \
+ -- -std="$std" $(make OPT_DEP_DEFAULT="$1" dump_cppflags) -DDEBUG
}
-run_cppcheck "0"; run_cppcheck "1";
-run_tidy "0"; run_tidy "1";
+run_cppcheck "0" & run_cppcheck "1" & run_tidy "0" & run_tidy "1";
+wait
diff --git a/etc/woodpecker/analysis.yml b/etc/woodpecker/analysis.yml
index 65da7aa..9ebcc4f 100644
--- a/etc/woodpecker/analysis.yml
+++ b/etc/woodpecker/analysis.yml
@@ -4,7 +4,7 @@ pipeline:
analysis:
image: alpine
commands: |
- apk add --no-cache build-base cppcheck clang-extra-tools \
+ apk add --no-cache build-base cppcheck clang-extra-tools git \
imlib2-dev xorgproto \
libxft-dev libexif-dev giflib-dev libwebp-dev >/dev/null
make config.h version.h
diff --git a/etc/woodpecker/build.yml b/etc/woodpecker/build.yml
index eced0d1..7c79a90 100644
--- a/etc/woodpecker/build.yml
+++ b/etc/woodpecker/build.yml
@@ -5,7 +5,7 @@ pipeline:
build:
image: alpine
environment:
- - TCC_SHA=027b8fb9b88fe137447fb8bb1b61079be9702472
+ - TCC_SHA=29ae3ed4d5b83eec43598d6cd7949bccb41c8083
commands: |
apk add --no-cache \
imlib2 imlib2-dev xorgproto \