GitLab CI: Consolidate repeated RPM declarations.

Move repeated build declarations to .build-rpm. Add .test-rpm and move
repeated test declarations there.
This commit is contained in:
Gerald Combs 2021-05-03 13:22:51 -07:00 committed by Wireshark GitLab Utility
parent 81ce8bbade
commit 71f66bee3b
1 changed files with 13 additions and 28 deletions

View File

@ -107,6 +107,7 @@ variables:
.build-rpm: .build-rpm:
extends: .build extends: .build
rules: !reference [.if-merged]
before_script: before_script:
# It might make sense to set "GIT_STRATEGY: none" and build from # It might make sense to set "GIT_STRATEGY: none" and build from
# the tarball. # the tarball.
@ -120,6 +121,14 @@ variables:
paths: paths:
- build/packaging/rpm/RPMS - build/packaging/rpm/RPMS
expire_in: 3 days expire_in: 3 days
needs:
- build:ubuntu-dist
.test-rpm:
rules: !reference [.if-merged]
stage: test
variables:
GIT_STRATEGY: none
.build-windows: .build-windows:
stage: build stage: build
@ -176,70 +185,51 @@ build:ubuntu-dist:
# https://gitlab.com/wireshark/wireshark-containers/-/tree/master/dev/centos-7 # https://gitlab.com/wireshark/wireshark-containers/-/tree/master/dev/centos-7
build:rpm-centos-7: build:rpm-centos-7:
extends: .build-rpm extends: .build-rpm
rules: !reference [.if-merged]
image: wireshark/wireshark-centos-7-dev image: wireshark/wireshark-centos-7-dev
script: script:
- cmake3 -GNinja .. - cmake3 -GNinja ..
- ninja-build rpm-package - ninja-build rpm-package
needs:
- build:ubuntu-dist
test:rpm-centos-7: test:rpm-centos-7:
rules: !reference [.if-merged] extends: .test-rpm
stage: test
image: wireshark/wireshark-centos-7-dev image: wireshark/wireshark-centos-7-dev
script: script:
- yum --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm - yum --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version - tshark --version
needs: needs:
- build:rpm-centos-7 - build:rpm-centos-7
variables:
GIT_STRATEGY: none
build:rpm-centos-8: build:rpm-centos-8:
extends: .build-rpm extends: .build-rpm
rules: !reference [.if-merged]
image: wireshark/wireshark-centos-8-dev image: wireshark/wireshark-centos-8-dev
script: script:
- cmake -GNinja .. - cmake -GNinja ..
- ninja-build rpm-package - ninja-build rpm-package
needs:
- build:ubuntu-dist
test:rpm-centos-8: test:rpm-centos-8:
rules: !reference [.if-merged] extends: .test-rpm
stage: test
image: wireshark/wireshark-centos-8-dev image: wireshark/wireshark-centos-8-dev
script: script:
- dnf --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm - dnf --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version - tshark --version
needs: needs:
- build:rpm-centos-8 - build:rpm-centos-8
variables:
GIT_STRATEGY: none
build:rpm-opensuse-15.2: build:rpm-opensuse-15.2:
extends: .build-rpm extends: .build-rpm
rules: !reference [.if-merged]
image: wireshark/wireshark-opensuse-15.2-dev image: wireshark/wireshark-opensuse-15.2-dev
script: script:
- cmake -GNinja .. - cmake -GNinja ..
- ninja rpm-package - ninja rpm-package
needs:
- build:ubuntu-dist
test:rpm-opensuse-15.2: test:rpm-opensuse-15.2:
rules: !reference [.if-merged] extends: .test-rpm
image: wireshark/wireshark-opensuse-15.2-dev image: wireshark/wireshark-opensuse-15.2-dev
stage: test
script: script:
- zypper --no-gpg-checks install -y build/packaging/rpm/RPMS/x86_64/*.rpm - zypper --no-gpg-checks install -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version - tshark --version
variables:
GIT_STRATEGY: none
needs: needs:
- build:rpm-opensuse-15.2 - build:rpm-opensuse-15.2
build:rpm-fedora: build:rpm-fedora:
extends: .build-rpm extends: .build-rpm
rules: !reference [.if-merged]
image: wireshark/wireshark-fedora-dev image: wireshark/wireshark-fedora-dev
script: script:
# Shared GitLab runners limit the log size to 4M, so reduce verbosity. See # Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
@ -247,17 +237,12 @@ build:rpm-fedora:
- export FORCE_CMAKE_NINJA_NON_VERBOSE=1 - export FORCE_CMAKE_NINJA_NON_VERBOSE=1
- cmake3 -GNinja .. - cmake3 -GNinja ..
- ninja rpm-package - ninja rpm-package
needs:
- build:ubuntu-dist
# test:rpm-fedora: # test:rpm-fedora:
# rules: !reference [.if-merged] # extends: .test-rpm
# image: fedora # image: fedora
# stage: test
# script: # script:
# - dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm # - dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm
# - tshark --version # - tshark --version
# variables:
# GIT_STRATEGY: none
# needs: # needs:
# - build:rpm-fedora # - build:rpm-fedora