Skip to content

cleanup: bump post-release version #38

cleanup: bump post-release version

cleanup: bump post-release version #38

Workflow file for this run

# SPDX-License-Identifier: BSD-3-Clause
# (c) Copyright 2024 Advanced Micro Devices, Inc.
name: "Create test packages"
on:
workflow_dispatch:
push:
branches: [master, v3_7]
tags: [v*, sfptpd-*]
permissions:
contents: read
jobs:
rpm:
strategy:
max-parallel: 2
matrix:
dist: [el9, el8, el7, el6]
include:
- dist: el9
build_os: stream9
extra_build_deps: systemd-rpm-macros
- dist: el8
build_os: stream8
extra_build_deps: systemd-rpm-macros
- dist: el7
build_os: centos7
extra_build_deps: systemd
- dist: el6
build_os: centos7
extra_build_deps:
runs-on: ubuntu-latest
env:
BUILD_DEPS: rpm-build gcc make libmnl-devel libcap-devel python3-devel
container:
image: quay.io/centos/centos:${{ matrix.build_os }}
steps:
- name: checkout sfptpd
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: enable extra repositories
if: ${{ matrix.build_os == 'stream9' }}
run: yum install -y 'dnf-command(config-manager)' && yum config-manager --set-enabled crb
- name: install build prerequisites
run: yum --setopt install_weak_deps=0 install -y ${BUILD_DEPS} ${{ matrix.extra_build_deps }}
- name: build srpm
run: set -o pipefail; make RPM_OSVER=${{ matrix.dist }} build_srpm | tee transcript && sed -n s,^ENV:,,p transcript >> "$GITHUB_ENV"
- name: publish srpm
uses: actions/upload-artifact@v3
with:
name: sfptpd-${{ env.SFPTPD_VERSION }}-srpm
path: ~/rpmbuild/SRPMS/
if-no-files-found: error
- name: build rpm
run: rpmbuild --rebuild ${{ env.SFPTPD_SRPMS }}
- name: publish rpms
uses: actions/upload-artifact@v3
with:
name: sfptpd-${{ env.SFPTPD_VERSION }}-${{ matrix.dist }}-rpms
path: ~/rpmbuild/RPMS/
if-no-files-found: error
bin-tgz:
name: binary tarball
runs-on: ubuntu-latest
env:
BUILD_DEPS: gcc make libmnl-devel libcap-devel
container:
image: quay.io/centos/centos:centos7
steps:
- name: checkout sfptpd
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install build prerequisites
run: yum install -y ${BUILD_DEPS}
- name: build binary
run: |
make patch_version
SFPTPD_ARCH=$(uname -i)
SFPTPD_VERSION=$(scripts/sfptpd_versioning read)
SFPTPD_STAGING=sfptpd-${SFPTPD_VERSION}.${SFPTPD_ARCH}
# Some older gcc versions generate doubtful complaint with
# optimiser enabled. We'll catch real errors on the newer builds.
make flat_install DESTDIR=${SFPTPD_STAGING} EXTRA_CFLAGS="-O2 -Wno-strict-aliasing"
echo 'Built on EL7 to support glibc 2.17 or later' > README.ThisBuild
mkdir TGZ
tar cvzf TGZ/${SFPTPD_STAGING}.tgz ${SFPTPD_STAGING} README.ThisBuild
printf "SFPTPD_VERSION=$SFPTPD_VERSION" >> "$GITHUB_ENV"
- name: publish binary archive
uses: actions/upload-artifact@v3
with:
name: sfptpd-${{ env.SFPTPD_VERSION }}-bin
path: TGZ
if-no-files-found: error