mirror of
https://github.com/git/git
synced 2024-08-25 10:45:59 +00:00
![Patrick Steinhardt](/assets/img/avatar_default.png)
Our GitHub Workflows definitions have a static analysis job that runs the following tasks: - Coccinelle to check for suggested refactorings. - `make hdr-check` to check for missing includes or forward declarations in our header files. - `make check-pot` to check our translations for issues. - `./ci/check-directional-formatting.bash` to check whether our sources contain any Unicode directional formatting code points. Add an equivalent job to our GitLab CI definitions. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
default:
|
|
timeout: 2h
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
|
|
|
test:
|
|
image: $image
|
|
before_script:
|
|
- ./ci/install-docker-dependencies.sh
|
|
script:
|
|
- useradd builder --create-home
|
|
- chown -R builder "${CI_PROJECT_DIR}"
|
|
- sudo --preserve-env --set-home --user=builder ./ci/run-build-and-tests.sh
|
|
after_script:
|
|
- |
|
|
if test "$CI_JOB_STATUS" != 'success'
|
|
then
|
|
sudo --preserve-env --set-home --user=builder ./ci/print-test-failures.sh
|
|
fi
|
|
parallel:
|
|
matrix:
|
|
- jobname: linux-sha256
|
|
image: ubuntu:latest
|
|
CC: clang
|
|
- jobname: linux-gcc
|
|
image: ubuntu:20.04
|
|
CC: gcc
|
|
CC_PACKAGE: gcc-8
|
|
- jobname: linux-TEST-vars
|
|
image: ubuntu:20.04
|
|
CC: gcc
|
|
CC_PACKAGE: gcc-8
|
|
- jobname: linux-gcc-default
|
|
image: ubuntu:latest
|
|
CC: gcc
|
|
- jobname: linux-leaks
|
|
image: ubuntu:latest
|
|
CC: gcc
|
|
- jobname: linux-asan-ubsan
|
|
image: ubuntu:latest
|
|
CC: clang
|
|
- jobname: pedantic
|
|
image: fedora:latest
|
|
- jobname: linux-musl
|
|
image: alpine:latest
|
|
artifacts:
|
|
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
|