diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5b6d8a3a8..8b31e4b0e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -584,6 +584,60 @@ jobs: name: Manpages path: ${{env.RouterBuildDir}}/docs/man/*.html + rpm: + name: 'Build and test RPM (${{ matrix.container }}:${{ matrix.containerTag }})' + runs-on: '${{ matrix.os }}' + strategy: + matrix: + os: [ 'ubuntu-20.04' ] + container: [ 'centos' ] + containerTag: [ 'stream8' ] + + container: + image: 'quay.io/${{ matrix.container }}/${{ matrix.container }}:${{ matrix.containerTag }}' + volumes: + - ${{github.workspace}}:${{github.workspace}} + + env: + DNF: ${{github.workspace}}/build + + steps: + - name: Install build dependencies (1/2) + run: | + dnf config-manager --set-enabled powertools + dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y epel-release 'dnf-command(copr)' 'dnf-command(builddep)' + dnf copr enable -y clime/rpkg-util + dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y git rpkg + + - uses: actions/checkout@v2 + + - name: Install build dependencies (2/2) + run: | + dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y gcc gcc-c++ + rpkg spec --outdir /tmp/rpkg + dnf builddep --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y /tmp/rpkg/skupper-router.spec + + - name: Build packages + run: | + mkdir /tmp/skupper-rpms + rpkg local --nocheck --outdir /tmp/skupper-rpms + + - name: Install built packages + run: | + dnf install -y /tmp/skupper-rpms/*/*.rpm + + - name: Check that skrouterd works + run: | + skrouterd -c /dev/empty |& grep "Configuration file could not be opened" + + - name: Check that manpages work + run: | + dnf install -y man + + man skrouterd + man skstat + man skmanage + rat_check: name: RAT Check runs-on: ubuntu-latest