Skip to content

Commit

Permalink
Add distcheck action on debian as well
Browse files Browse the repository at this point in the history
Given debian has diffeent libdir directories, better check distcheck
there as well.

As part of this job seaprate build and distcheck jobs as we do not need
the pkcs11 drivers testing matrix for distchecking

Signed-off-by: Simo Sorce <simo@redhat.com>
  • Loading branch information
simo5 committed Nov 18, 2022
1 parent 061d4e7 commit d927605
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,21 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [fedora-gcc, fedora-clang, debian-clang, fedora-distcheck]
name: [fedora, debian]
compiler: [gcc, clang]
token: [softokn, softhsm]
include:
- name: fedora-gcc
- name: fedora
container: fedora:latest
compiler: gcc
action: check
- name: fedora-clang
container: fedora:latest
compiler: clang
action: check
- name: debian-clang
- name: debian
container: debian:sid
compiler: clang
action: check
- name: fedora-distcheck
container: fedora:latest
compiler: gcc
action: distcheck
container: ${{ matrix.container }}
steps:
- name: Install Dependencies
run: |
if [ -f /etc/fedora-release ]; then
dnf -y install git ${{ matrix.compiler }} automake libtool \
pkgconf-pkg-config autoconf-archive openssl-devel openssl xz
pkgconf-pkg-config autoconf-archive openssl-devel openssl
if [ "${{ matrix.token }}" = "softokn" ]; then
dnf -y install nss-softokn nss-tools nss-softokn-devel
elif [ "${{ matrix.token }}" = "softhsm" ]; then
Expand All @@ -62,7 +51,7 @@ jobs:
autoreconf -fiv
CC=${{ matrix.compiler }} ./configure
- name: Build and Test
run: make ${{ matrix.action }}
run: make check
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/distcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Distribution checks

on:
pull_request:
branches: [ "main" ]

jobs:
distcheck:
name: Test make distcheck and RPM Build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
name: [fedora, debian]
include:
- name: fedora
container: fedora:latest
- name: debian
container: debian:sid
container: ${{ matrix.container }}
steps:
- name: Install Dependencies
run: |
if [ -f /etc/fedora-release ]; then
dnf -y install git gcc automake libtool \
pkgconf-pkg-config autoconf-archive openssl-devel openssl xz \
nss-softokn nss-tools nss-softokn-devel \
softhsm opensc p11-kit-devel p11-kit-server \
rpm-build nss-devel
elif [ -f /etc/debian_version ]; then
apt-get -q update
apt-get -yq install git gcc make automake \
libtool pkg-config autoconf-archive libssl-dev openssl xz-utils \
libnss3 libnss3-tools libnss3-dev \
softhsm opensc p11-kit libp11-kit-dev p11-kit-modules
fi
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup
run: |
autoreconf -fiv
./configure
- name: Distcheck
run: make distcheck
- name: RPM Build
if: ${{ matrix.name == 'fedora' }}
run: |
mkdir -p rpmbuild/SOURCES
cp pkcs11-provider*tar.gz rpmbuild/SOURCES/
rpmbuild --define "_topdir $PWD/rpmbuild" -ba packaging/pkcs11-provider.spec

0 comments on commit d927605

Please sign in to comment.