aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-01-06 18:25:40 -0800
committerA Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2022-01-07 03:32:26 +0000
commit947d80c477b601f0c8808ff80867aa0b3c9ebedd (patch)
treeae0de985a71c4cea5fa728123f1b566c5033503d /.gitlab-ci.yml
parentc14d731e4580adea858b5745aa89c7975eff8966 (diff)
GitLab CI: Swap the Ubuntu package and latest Clang builds.
The Ubuntu APT Package job takes a long time to run. Do so after merging and add a package test job, similar to the other Linux package builds. The Latest Clang job has been detecting errors that also affect macOS. Run it for merge requests. Fix Ubuntu build caching.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml61
1 files changed, 39 insertions, 22 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2c425907e5..e63bfa16cd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -113,14 +113,10 @@ variables:
- echo "$NUM_COMMITS commit(s) in this MR"
- mkdir build
- cd build
- after_script:
- # The cache should be large enough to be useful but it shouldn't take
- # too long to restore+save each run.
- - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
script:
# setcap restricts our library paths
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- - CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja $CMAKE_ARGS ..
+ - CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja -DENABLE_CCACHE=ON $CMAKE_ARGS ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja
- ninja install
@@ -130,6 +126,10 @@ variables:
- if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
- if [ -f run/dumpcap ]; then su user -c "run/dumpcap -D" ; fi
- su user -c pytest-3
+ after_script:
+ # The cache should be large enough to be useful but it shouldn't take
+ # too long to restore+save each run.
+ - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
.build-rpm:
extends: .build-linux
@@ -178,14 +178,6 @@ variables:
- cd build
needs: []
-# Rely on fedora:latest and debian-stable jobs for testing a recent GCC version.
-Latest Clang:
- extends: .build-ubuntu
- rules: !reference [.if-merged]
- variables:
- CC: "clang-$CLANG_VERSION"
- CXX: "clang++-$CLANG_VERSION"
-
Source Package:
extends: .build-ubuntu
stage: .pre
@@ -305,6 +297,35 @@ Rocky Linux 8 RPM Test:
- tshark --version
needs: [ 'Rocky Linux 8 RPM Package' ]
+Ubuntu APT Package:
+ extends: .build-ubuntu
+ rules: !reference [.if-merged]
+ script:
+ # build-ubuntu puts us in `build`.
+ - cd ..
+ - CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ MAKE=ninja dpkg-buildpackage -us -uc -rfakeroot -jauto -Zgzip -zfast
+ - mkdir ubuntu-packages
+ - mv ../*.deb ubuntu-packages/
+ after_script:
+ # dpkg-buildpackage builds in obj-<triplet>, so we need to override
+ # .build-ubuntu. We also build more stuff, so decrease our multiplier.
+ - ccache --max-size $( du --summarize --block-size=1M --total "$CI_PROJECT_DIR"/obj-* | awk '/total$/ {printf ("%dM", $1 * 1.25)}' )
+ artifacts:
+ paths:
+ - ubuntu-packages/*.deb
+ expire_in: 3 days
+Ubuntu APT Test:
+ extends: .test-linux
+ rules: !reference [.if-merged]
+ image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
+ stage: test
+ script:
+ - DEBIAN_FRONTEND=noninteractive apt-get install ./ubuntu-packages/*.deb -y
+ - tshark --version
+ variables:
+ GIT_STRATEGY: none
+ needs: [ 'Ubuntu APT Package' ]
+
Win64 Package:
extends: .build-windows
rules: !reference [.if-w-w-only-merged]
@@ -514,17 +535,13 @@ Commit Check:
- bash ./tools/pre-commit "HEAD^$NUM_COMMITS"
- tools/validate-commit.py
-Ubuntu .dpkg:
+# Rely on fedora:latest and debian-stable jobs for testing a recent GCC version.
+Latest Clang:
extends: .build-ubuntu
rules: !reference [.if-merge-request]
- script:
- # build-ubuntu puts us in `build`.
- - cd ..
- - CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ MAKE=ninja dpkg-buildpackage -us -uc -rfakeroot -jauto -Zgzip -zfast
- after_script:
- # dpkg-buildpackage builds in obj-<triplet>, so we need to override
- # .build-ubuntu. We also build more stuff, so decrease our multiplier.
- - ccache --max-size $( du --summarize --block-size=1M --total "$CI_PROJECT_DIR"/obj-* | awk '/total$/ {printf ("%dM", $1 * 1.25)}' )
+ variables:
+ CC: "clang-$CLANG_VERSION"
+ CXX: "clang++-$CLANG_VERSION"
GCC Warnings:
extends: .build-ubuntu