diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-20 02:04:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-20 02:04:45 +0300 |
commit | 95a9cfbb8309b5ecae4a625d21b662d0d9acc41a (patch) | |
tree | d461aef1b3da5889d73e214113585c28f10497a0 | |
parent | 9ea8145387a942a55386a197bfc870dbbb530ede (diff) | |
parent | cd69c635a1a62b0c8bfdbf221778be8a512ad048 (diff) |
Merge branch 'ps/gitlab-ci-static-analysis'
GitLab CI update.
* ps/gitlab-ci-static-analysis:
ci: add job performing static analysis on GitLab CI
-rw-r--r-- | .gitlab-ci.yml | 10 | ||||
-rwxr-xr-x | ci/install-docker-dependencies.sh | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd98bcb18a..793243421c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,3 +51,13 @@ test: paths: - t/failed-test-artifacts when: on_failure + +static-analysis: + image: ubuntu:22.04 + variables: + jobname: StaticAnalysis + before_script: + - ./ci/install-docker-dependencies.sh + script: + - ./ci/run-static-analysis.sh + - ./ci/check-directional-formatting.bash diff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh index 48c43f0f90..eb2c9e1eca 100755 --- a/ci/install-docker-dependencies.sh +++ b/ci/install-docker-dependencies.sh @@ -21,7 +21,7 @@ linux-musl) apache2 apache2-http2 apache2-proxy apache2-ssl apache2-webdav apr-util-dbd_sqlite3 \ bash cvs gnupg perl-cgi perl-dbd-sqlite >/dev/null ;; -linux-*) +linux-*|StaticAnalysis) # Required so that apt doesn't wait for user input on certain packages. export DEBIAN_FRONTEND=noninteractive @@ -31,6 +31,11 @@ linux-*) perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl \ libdbd-sqlite3-perl libio-socket-ssl-perl libnet-smtp-ssl-perl ${CC_PACKAGE:-${CC:-gcc}} \ apache2 cvs cvsps gnupg libcgi-pm-perl subversion + + if test "$jobname" = StaticAnalysis + then + apt install -q -y coccinelle + fi ;; pedantic) dnf -yq update >/dev/null && |