Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): add distrib name in libzmq deb package #1133

Merged
merged 10 commits into from
Feb 12, 2024
31 changes: 19 additions & 12 deletions .github/workflows/libzmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
fail-fast: false
matrix:
include:
- image: packaging-alma8
- image: packaging-nfpm-alma8
distrib: el8
arch: amd64
- image: packaging-alma9
- image: packaging-nfpm-alma9
distrib: el9
arch: amd64

Expand All @@ -52,15 +52,18 @@ jobs:
dnf install -y wget rpmdevtools rpmlint epel-release
dnf config-manager --set-enabled crb || true # alma 9
dnf config-manager --set-enabled powertools || true # alma 8
dnf install -y asciidoc autoconf automake gcc gcc-c++ glib2-devel libbsd-devel libtool make xmlto
dnf install -y asciidoc autoconf automake gcc gcc-c++ glib2-devel libbsd-devel libtool make rpm-build xmlto

cd /github/home
wget -O - https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.5.tar.gz|tar zxvf -
wget -O - https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.5.tar.gz | tar zxvf -
mkdir -p /github/home/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
cp libzmq-4.3.5/packaging/redhat/zeromq.spec /github/home/rpmbuild/SPECS/
wget https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz -O /github/home/rpmbuild/SOURCES/zeromq-4.3.5.tar.gz
rpmbuild -bb /github/home/rpmbuild/SPECS/zeromq.spec
cd -

mv /github/home/rpmbuild/RPMS/x86_64/*.rpm ./
rm -f zeromq-debugsource-*.rpm libzmq5-debuginfo-*.rpm
shell: bash

- name: cache rpm
Expand All @@ -76,11 +79,11 @@ jobs:
fail-fast: false
matrix:
include:
- image: packaging-bullseye
- image: packaging-nfpm-bullseye
distrib: bullseye
runner: ubuntu-22.04
arch: amd64
- image: packaging-bookworm
- image: packaging-nfpm-bookworm
distrib: bookworm
runner: ubuntu-22.04
arch: amd64
Expand All @@ -107,20 +110,24 @@ jobs:
- name: package deb
run: |
apt-get update
apt-get install -y dpkg-dev wget
apt-get install -y debhelper dh-autoreconf libkrb5-dev libnorm-dev libpgm-dev libsodium-dev libunwind8-dev libnss3-dev libgnutls28-dev libbsd-dev pkg-config asciidoc xmlto
wget -O - https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz|tar zxvf -
apt-get install -y debhelper dh-autoreconf dpkg-dev libkrb5-dev libnorm-dev libpgm-dev libsodium-dev libunwind8-dev libnss3-dev libgnutls28-dev libbsd-dev pkg-config asciidoc wget xmlto
wget -O - https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz | tar zxvf -

cd zeromq-4.3.5
./configure
make
make install
cd ..
wget -O - https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.5.tar.gz|tar zxvf -

wget -O - https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.5.tar.gz | tar zxvf -
cd libzmq-4.3.5
apt-get install -y debhelper dh-autoreconf libkrb5-dev libnorm-dev libpgm-dev libsodium-dev libunwind8-dev libnss3-dev libgnutls28-dev libbsd-dev pkg-config asciidoc xmlto
ln -s packaging/debian
sed -Ei 's/([0-9]+.[0-9]+.[0-9]+-[0-9]+.[0-9]+)/\1~${{ matrix.distrib }}/' debian/changelog
sed -Ei 's/UNRELEASED/${{ matrix.distrib }}/' debian/changelog
dpkg-buildpackage -us -uc -nc
cd ..

rm -f libzmq5-dbg_*.deb
shell: bash

- name: cache deb
Expand Down Expand Up @@ -175,7 +182,7 @@ jobs:
- distrib: jammy
arch: amd64

name: deliver ${{ matrix.distrib }}
name: deliver ${{ matrix.distrib }} ${{ matrix.arch }}

steps:
- name: Checkout sources
Expand Down