Browse Source

TT#124273 GitHub actions: use pkg script for execution

Instead of having to rely on external repositories (like the
ubuntu-cloud-archive/yoga-staging PPA for the debhelper v13 backport),
let's use the pkg script instead. The pkg scripts ensure that the
debian/ directory looks as expected for the according distribution. So
for executing coverity + unit-tests in the Ubuntu/focal / ubuntu-20.04
environment on GitHub, let's use pkg/deb/backports/focal for generating
the according Debian source tree.

Related change in pkg: make `wrap-and-sort` execution optional. We don't
have devscripts installed by default in Ubuntu/focal / ubuntu-20.04
environment on GitHub, while usage of wrap-and-sort can be considered
optional for our purposes.

Change-Id: Ic252b323408fab557e3f151a93f61aa8fac1a30f
pull/1501/head
Michael Prokop 4 years ago
parent
commit
b657af1905
9 changed files with 52 additions and 14 deletions
  1. +7
    -2
      .github/workflows/coverity.yml
  2. +7
    -2
      .github/workflows/unit-tests.yml
  3. +5
    -1
      pkg/deb/backports/bookworm
  4. +5
    -1
      pkg/deb/backports/bullseye
  5. +5
    -1
      pkg/deb/backports/buster
  6. +5
    -1
      pkg/deb/backports/focal
  7. +5
    -1
      pkg/deb/backports/sid
  8. +5
    -1
      pkg/deb/backports/stretch
  9. +8
    -4
      pkg/deb/generator.sh

+ 7
- 2
.github/workflows/coverity.yml View File

@ -28,8 +28,13 @@ jobs:
- name: Get build dependencies
run: |
# note: debhelper v13 isn't available from ubuntu-20.04 yet, we need a backport
sudo apt-add-repository -y ppa:ubuntu-cloud-archive/yoga-staging
echo "Generating Debian source for usage on Ubuntu/focal / ubuntu-20.04"
cd pkg/deb/
./generator.sh
./backports/focal
rm -rf debian
mv focal debian
echo "Installing Debian packages"
sudo apt-get install -q -y --no-install-recommends git ca-certificates curl
sudo apt-get build-dep -q -y -Ppkg.ngcp-rtpengine.nobcg729 .


+ 7
- 2
.github/workflows/unit-tests.yml View File

@ -21,8 +21,13 @@ jobs:
- name: Get build dependencies
run: |
# note: debhelper v13 isn't available from ubuntu-20.04 yet, we need a backport
sudo apt-add-repository -y ppa:ubuntu-cloud-archive/yoga-staging
echo "Generating Debian source for usage on Ubuntu/focal / ubuntu-20.04"
cd pkg/deb/
./generator.sh
./backports/focal
rm -rf debian
mv focal debian
echo "Installing Debian packages"
sudo apt-get build-dep -q -y -Ppkg.ngcp-rtpengine.nobcg729 .
- name: Run unit tests with sanitizers enabled


+ 5
- 1
pkg/deb/backports/bookworm View File

@ -11,7 +11,11 @@ fi
rm -rf ${DIST}
cp -r debian ${DIST}
wrap-and-sort -sat -d ${DIST}
if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST}
else
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
fi
# clean backports scripts
rm -rf ${DIST}/backports


+ 5
- 1
pkg/deb/backports/bullseye View File

@ -25,7 +25,11 @@ override_dh_dwz:
# Disable, as dwz cannot cope with some of the plugins generated.
EOF
wrap-and-sort -sat -d ${DIST}
if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST}
else
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
fi
# clean backports scripts
rm -rf ${DIST}/backports


+ 5
- 1
pkg/deb/backports/buster View File

@ -28,7 +28,11 @@ override_dh_dwz:
# Disable, as dwz cannot cope with some of the plugins generated.
EOF
wrap-and-sort -sat -d ${DIST}
if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST}
else
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
fi
# clean backports scripts
rm -rf ${DIST}/backports


+ 5
- 1
pkg/deb/backports/focal View File

@ -28,7 +28,11 @@ override_dh_dwz:
# Disable, as dwz cannot cope with some of the plugins generated.
EOF
wrap-and-sort -sat -d ${DIST}
if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST}
else
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
fi
# clean backports scripts
rm -rf ${DIST}/backports


+ 5
- 1
pkg/deb/backports/sid View File

@ -11,7 +11,11 @@ fi
rm -rf ${DIST}
cp -r debian ${DIST}
wrap-and-sort -sat -d ${DIST}
if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST}
else
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
fi
# clean backports scripts
rm -rf ${DIST}/backports


+ 5
- 1
pkg/deb/backports/stretch View File

@ -37,7 +37,11 @@ override_dh_systemd_start:
dh_systemd_start -prtpengine-recording-daemon --name=rtpengine-recording-nfs-mount
EOF
wrap-and-sort -sat -d ${DIST}
if command -v wrap-and-sort &>/dev/null ; then
wrap-and-sort -sat -d ${DIST}
else
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
fi
# clean backports scripts
rm -rf ${DIST}/backports


+ 8
- 4
pkg/deb/generator.sh View File

@ -46,7 +46,11 @@ while read -r file; do
mv "${file}" "${file_new}"
done < <(find debian -maxdepth 1 -type f -name 'ngcp-rtpengine*')
echo "- Remove empty Suggests"
wrap-and-sort
sed -i -e '/Suggests:$/d' debian/control
wrap-and-sort -sat
if ! command -v wrap-and-sort &>/dev/null ; then
echo "WARN: wrap-and-sort (Debian package devscripts) not available."
else
echo "- Remove empty Suggests"
wrap-and-sort
sed -i -e '/Suggests:$/d' debian/control
wrap-and-sort -sat
fi

Loading…
Cancel
Save