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-daily-schedule:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily"'
|
||||||
when: always
|
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
|
# Fuzz jobs. Care should be taken when changing this since the scheduler
|
||||||
# often doesn't report errors.
|
# often doesn't report errors.
|
||||||
.if-fuzz-schedule:
|
.if-fuzz-schedule:
|
||||||
|
@ -80,7 +83,7 @@ variables:
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
after_script:
|
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 [[ "$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
|
- if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi
|
||||||
needs: []
|
needs: []
|
||||||
|
@ -135,24 +138,14 @@ variables:
|
||||||
|
|
||||||
.build-rpm:
|
.build-rpm:
|
||||||
extends: .build-linux
|
extends: .build-linux
|
||||||
rules: !reference [.if-merged]
|
rules: !reference [.if-2x-daily-schedule]
|
||||||
cache:
|
|
||||||
key: ${CI_JOB_NAME}-master
|
|
||||||
paths:
|
|
||||||
- ccache/
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p ccache
|
|
||||||
- ccache --show-stats
|
|
||||||
- git config --global user.email "you@example.com"
|
- git config --global user.email "you@example.com"
|
||||||
- git config --global user.name "Your Name"
|
- git config --global user.name "Your Name"
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- ../tools/make-version.py --set-release ..
|
- ../tools/make-version.py --set-release ..
|
||||||
- mv -v ../wireshark-*.tar.* .
|
- 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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/packaging/rpm/RPMS
|
- build/packaging/rpm/RPMS
|
||||||
|
@ -191,15 +184,18 @@ variables:
|
||||||
Source Package:
|
Source Package:
|
||||||
extends: .build-ubuntu
|
extends: .build-ubuntu
|
||||||
stage: .pre
|
stage: .pre
|
||||||
rules: !reference [.if-merged]
|
rules:
|
||||||
|
- !reference [.if-merged]
|
||||||
|
- !reference [.if-2x-daily-schedule]
|
||||||
script:
|
script:
|
||||||
- ../tools/make-version.py --set-release ..
|
- ../tools/make-version.py --set-release ..
|
||||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
- 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)"
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||||
- cd $CI_PROJECT_DIR
|
- cd $CI_PROJECT_DIR
|
||||||
- build/packaging/source/git-export-release.sh -d .
|
- build/packaging/source/git-export-release.sh -d .
|
||||||
after_script:
|
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)}' )
|
# - 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.*
|
- stat --format="%n %s bytes" wireshark-*.tar.*
|
||||||
- for digest in sha512 sha256 sha1 ; do openssl $digest wireshark-*.tar.* ; done
|
- 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
|
# Job to generate packages for Debian stable
|
||||||
Debian Stable APT Package:
|
Debian Stable APT Package:
|
||||||
extends: .build-linux
|
extends: .build-linux
|
||||||
rules: !reference [.if-merged]
|
rules: !reference [.if-2x-daily-schedule]
|
||||||
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
||||||
script:
|
script:
|
||||||
- ln --symbolic --no-dereference --force packaging/debian
|
- ln --symbolic --no-dereference --force packaging/debian
|
||||||
|
@ -235,7 +231,7 @@ Debian Stable APT Package:
|
||||||
|
|
||||||
Debian Stable APT Test:
|
Debian Stable APT Test:
|
||||||
extends: .test-linux
|
extends: .test-linux
|
||||||
rules: !reference [.if-merged]
|
rules: !reference [.if-2x-daily-schedule]
|
||||||
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
@ -253,7 +249,7 @@ Fedora RPM Package:
|
||||||
# https://gitlab.com/gitlab-com/support-forum/issues/2790
|
# https://gitlab.com/gitlab-com/support-forum/issues/2790
|
||||||
- export FORCE_CMAKE_NINJA_NON_VERBOSE=1
|
- export FORCE_CMAKE_NINJA_NON_VERBOSE=1
|
||||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
- 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)"
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||||
- ninja wireshark_rpm
|
- ninja wireshark_rpm
|
||||||
|
|
||||||
|
@ -270,7 +266,7 @@ openSUSE 15.3 RPM Package:
|
||||||
image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.3-dev
|
image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.3-dev
|
||||||
script:
|
script:
|
||||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
- 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)"
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||||
- ninja wireshark_rpm
|
- ninja wireshark_rpm
|
||||||
|
|
||||||
|
@ -287,7 +283,7 @@ Rocky Linux 9 RPM Package:
|
||||||
image: registry.gitlab.com/wireshark/wireshark-containers/rockylinux-9-dev
|
image: registry.gitlab.com/wireshark/wireshark-containers/rockylinux-9-dev
|
||||||
script:
|
script:
|
||||||
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
- 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)"
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
||||||
- ninja wireshark_rpm
|
- ninja wireshark_rpm
|
||||||
|
|
||||||
|
@ -301,7 +297,7 @@ Rocky Linux 9 RPM Test:
|
||||||
|
|
||||||
Ubuntu APT Package:
|
Ubuntu APT Package:
|
||||||
extends: .build-ubuntu
|
extends: .build-ubuntu
|
||||||
rules: !reference [.if-merged]
|
rules: !reference [.if-2x-daily-schedule]
|
||||||
script:
|
script:
|
||||||
# build-ubuntu puts us in `build`.
|
# build-ubuntu puts us in `build`.
|
||||||
- cd ..
|
- cd ..
|
||||||
|
@ -322,7 +318,7 @@ Ubuntu APT Package:
|
||||||
|
|
||||||
Ubuntu APT Test:
|
Ubuntu APT Test:
|
||||||
extends: .test-linux
|
extends: .test-linux
|
||||||
rules: !reference [.if-merged]
|
rules: !reference [.if-2x-daily-schedule]
|
||||||
image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
|
image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -3547,7 +3547,7 @@ if(RPMBUILD_EXECUTABLE)
|
||||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/packaging/rpm/${_rpm_dir}")
|
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/packaging/rpm/${_rpm_dir}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(_rpmbuild_with_args ${RPMBUILD_EXTRA_ARGS})
|
set(_rpmbuild_with_args)
|
||||||
#
|
#
|
||||||
# This is ugly.
|
# This is ugly.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue