forked from osmocom/wireshark
GitLab CI: Switch our Linux packages to a twice daily schedule.
The RPM packages use a versioned build directory, which creates problems for ccache. The APT packages simply take a long time to build. Switch both to a twice-daily schedule so that we don't set fire to CI minutes in parallel with every merge. Back out a recent CMake change since it's no longer needed.
This commit is contained in:
parent
61d81683c8
commit
83d5533711
|
@ -69,6 +69,9 @@ variables:
|
|||
.if-daily-schedule:
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily"'
|
||||
when: always
|
||||
.if-2x-daily-schedule:
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "2x-daily"'
|
||||
when: always
|
||||
# Fuzz jobs. Care should be taken when changing this since the scheduler
|
||||
# often doesn't report errors.
|
||||
.if-fuzz-schedule:
|
||||
|
@ -80,7 +83,7 @@ variables:
|
|||
tags:
|
||||
- docker
|
||||
after_script:
|
||||
- for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark* build obj-*; do [ ! -d "$builddir/run" ] || break; done
|
||||
- for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark-* build obj-*; do [ ! -d "$builddir/run" ] || break; done
|
||||
- if [[ "$CI_JOB_NAME" == "build:rpm-opensuse-"* ]]; then export LD_LIBRARY_PATH=$builddir/run; fi
|
||||
- if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi
|
||||
needs: []
|
||||
|
@ -135,24 +138,14 @@ variables:
|
|||
|
||||
.build-rpm:
|
||||
extends: .build-linux
|
||||
rules: !reference [.if-merged]
|
||||
cache:
|
||||
key: ${CI_JOB_NAME}-master
|
||||
paths:
|
||||
- ccache/
|
||||
rules: !reference [.if-2x-daily-schedule]
|
||||
before_script:
|
||||
- mkdir -p ccache
|
||||
- ccache --show-stats
|
||||
- git config --global user.email "you@example.com"
|
||||
- git config --global user.name "Your Name"
|
||||
- mkdir build
|
||||
- cd build
|
||||
- ../tools/make-version.py --set-release ..
|
||||
- mv -v ../wireshark-*.tar.* .
|
||||
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/packaging/rpm/BUILD/wireshark | awk '{printf ("%dM", $1 * 1.5)}' )
|
||||
artifacts:
|
||||
paths:
|
||||
- build/packaging/rpm/RPMS
|
||||
|
@ -191,15 +184,18 @@ variables:
|
|||
Source Package:
|
||||
extends: .build-ubuntu
|
||||
stage: .pre
|
||||
rules: !reference [.if-merged]
|
||||
rules:
|
||||
- !reference [.if-merged]
|
||||
- !reference [.if-2x-daily-schedule]
|
||||
script:
|
||||
- ../tools/make-version.py --set-release ..
|
||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
||||
- cmake -G Ninja $CMAKE_ARGS -DENABLE_CCACHE=ON ..
|
||||
- cmake -G Ninja $CMAKE_ARGS ..
|
||||
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||
- cd $CI_PROJECT_DIR
|
||||
- build/packaging/source/git-export-release.sh -d .
|
||||
after_script:
|
||||
- if [ -n "$SCHEDULE_TYPE" ] ; then exit 0 ; fi
|
||||
# - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
|
||||
- stat --format="%n %s bytes" wireshark-*.tar.*
|
||||
- for digest in sha512 sha256 sha1 ; do openssl $digest wireshark-*.tar.* ; done
|
||||
|
@ -212,7 +208,7 @@ Source Package:
|
|||
# Job to generate packages for Debian stable
|
||||
Debian Stable APT Package:
|
||||
extends: .build-linux
|
||||
rules: !reference [.if-merged]
|
||||
rules: !reference [.if-2x-daily-schedule]
|
||||
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
||||
script:
|
||||
- ln --symbolic --no-dereference --force packaging/debian
|
||||
|
@ -235,7 +231,7 @@ Debian Stable APT Package:
|
|||
|
||||
Debian Stable APT Test:
|
||||
extends: .test-linux
|
||||
rules: !reference [.if-merged]
|
||||
rules: !reference [.if-2x-daily-schedule]
|
||||
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
||||
stage: test
|
||||
script:
|
||||
|
@ -253,7 +249,7 @@ Fedora RPM Package:
|
|||
# https://gitlab.com/gitlab-com/support-forum/issues/2790
|
||||
- export FORCE_CMAKE_NINJA_NON_VERBOSE=1
|
||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
||||
- cmake3 -G Ninja -DENABLE_CCACHE=ON -DRPMBUILD_EXTRA_ARGS="--define;__cmake_builddir $CI_PROJECT_DIR/build/packaging/rpm/BUILD/wireshark" ..
|
||||
- cmake3 -G Ninja ..
|
||||
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||
- ninja wireshark_rpm
|
||||
|
||||
|
@ -270,7 +266,7 @@ openSUSE 15.3 RPM Package:
|
|||
image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.3-dev
|
||||
script:
|
||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
||||
- cmake -G Ninja -DENABLE_CCACHE=ON -DRPMBUILD_EXTRA_ARGS="--define;__cmake_builddir $CI_PROJECT_DIR/build/packaging/rpm/BUILD/wireshark" -DUSE_qt6=OFF ..
|
||||
- cmake -G Ninja -DUSE_qt6=OFF ..
|
||||
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||
- ninja wireshark_rpm
|
||||
|
||||
|
@ -287,7 +283,7 @@ Rocky Linux 9 RPM Package:
|
|||
image: registry.gitlab.com/wireshark/wireshark-containers/rockylinux-9-dev
|
||||
script:
|
||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
||||
- cmake -G Ninja -DENABLE_CCACHE=ON -DRPMBUILD_EXTRA_ARGS="--define;__cmake_builddir $CI_PROJECT_DIR/build/packaging/rpm/BUILD/wireshark" -DUSE_qt6=OFF ..
|
||||
- cmake -G Ninja -DUSE_qt6=OFF ..
|
||||
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||
- ninja wireshark_rpm
|
||||
|
||||
|
@ -301,7 +297,7 @@ Rocky Linux 9 RPM Test:
|
|||
|
||||
Ubuntu APT Package:
|
||||
extends: .build-ubuntu
|
||||
rules: !reference [.if-merged]
|
||||
rules: !reference [.if-2x-daily-schedule]
|
||||
script:
|
||||
# build-ubuntu puts us in `build`.
|
||||
- cd ..
|
||||
|
@ -322,7 +318,7 @@ Ubuntu APT Package:
|
|||
|
||||
Ubuntu APT Test:
|
||||
extends: .test-linux
|
||||
rules: !reference [.if-merged]
|
||||
rules: !reference [.if-2x-daily-schedule]
|
||||
image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
|
||||
stage: test
|
||||
script:
|
||||
|
|
|
@ -3547,7 +3547,7 @@ if(RPMBUILD_EXECUTABLE)
|
|||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/packaging/rpm/${_rpm_dir}")
|
||||
endforeach()
|
||||
|
||||
set(_rpmbuild_with_args ${RPMBUILD_EXTRA_ARGS})
|
||||
set(_rpmbuild_with_args)
|
||||
#
|
||||
# This is ugly.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue