diff options
author | Gerald Combs <gerald@wireshark.org> | 2020-12-21 17:02:30 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2020-12-21 17:19:04 -0800 |
commit | fc124f45bb6daa9817e2e5867e56b21442fa335a (patch) | |
tree | eaef14dc15168cf8e216bd24a1a62d340388cdd3 /.gitlab-ci.yml | |
parent | b468b1fb0106dc0c51a0f4279613a4b8aebfbf0d (diff) |
GitLab CI: Use shallow clones for merge requests.
We currently disable shallow clones in our general pipeline settings
because jobs that create packages need a usable `git describe`. None of
our merge request jobs create packages, so clone shallowly in order to
speed things up.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69a40e6b8d..8e3bca0b42 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -266,6 +266,8 @@ merge-req:commit-checks: - docker rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + variables: + GIT_DEPTH: 10 script: # build-ubuntu puts us in `build`. - cd .. @@ -278,6 +280,8 @@ merge-req:ubuntu-dpkg: - docker rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + variables: + GIT_DEPTH: 10 script: # build-ubuntu puts us in `build`. - cd .. @@ -294,9 +298,10 @@ merge-req:ubuntu-gcc-ctest: - docker rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + variables: + GIT_DEPTH: 10 script: # build-ubuntu puts us in `build`. - - perl ../tools/make-version.pl --set-release || ../perl make-version.pl --set-release - CC=gcc CXX=g++ cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja .. - ninja - ninja test-programs @@ -309,6 +314,8 @@ merge-req:ubuntu-clang-other-tests: - docker rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + variables: + GIT_DEPTH: 10 script: # build-ubuntu puts us in `build`. - cd .. @@ -343,6 +350,8 @@ merge-req:windows: # The wireshark-windows-dev image is only available via a dedicated runner. - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/' when: always + variables: + GIT_DEPTH: 10 before_script: # XXX Find a better location. - cmd.exe /c "set CI_PIPELINE_SOURCE" @@ -363,7 +372,6 @@ merge-req:windows: #- cmd.exe /c "set" #- Get-Location script: - - perl tools/make-version.pl --set-release - mkdir build - cd build - cmake -G "Visual Studio 16 2019" -A x64 -DENABLE_LTO=off .. |