diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-09-25 15:23:26 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-10-24 14:30:38 +0200 |
commit | 2af4e3970ee1040f9c733a97b82563c856386e92 (patch) | |
tree | a19567d80be2e7d578f901b665773eb9832c20b3 | |
parent | cf3c2ee5b3a48bd3388593036b10cae8b69bcdc1 (diff) | |
download | libssh-2af4e3970ee1040f9c733a97b82563c856386e92.tar.gz libssh-2af4e3970ee1040f9c733a97b82563c856386e92.tar.xz libssh-2af4e3970ee1040f9c733a97b82563c856386e92.zip |
gitlab-ci: Add static analysis with csbuild
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | .gitlab-ci.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e134339..b8d66c0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,6 +85,37 @@ fedora/undefined-sanitizer: paths: - obj/ +fedora/csbuild: + image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD + script: + - | + if [[ -z "$CI_COMMIT_BEFORE_SHA" ]]; then + export CI_COMMIT_BEFORE_SHA=$(git rev-parse HEAD^) + fi + + # Check if the commit exists in this branch + # This is not the case for a force push + git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export CI_COMMIT_BEFORE_SHA=$(git rev-parse HEAD^) + + export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" + + - csbuild + --build-dir=obj-csbuild + --prep-cmd="cmake -DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON -DFUZZ_TESTING=ON @SRCDIR@" + --build-cmd "make clean && make -j$(nproc)" + --git-commit-range $CI_COMMIT_RANGE + --color + --print-current --print-fixed + tags: + - shared + except: + - tags + artifacts: + expire_in: 1 week + when: on_failure + paths: + - obj-csbuild/ + # That is a specific runner that we cannot enable universally. # We restrict it to builds under the $BUILD_IMAGES_PROJECT project. freebsd/x86_64: |