-
Notifications
You must be signed in to change notification settings - Fork 67
69 lines (63 loc) · 2.29 KB
/
distcheck.yml
File metadata and controls
69 lines (63 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
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, centos9, centos10]
include:
- name: fedora
container: quay.io/fedora/fedora:latest
- name: debian
container: quay.io/opendevmirror/debian:trixie
- name: centos9
container: quay.io/centos/centos:stream9
- name: centos10
container: quay.io/centos/centos:stream10
container: ${{ matrix.container }}
steps:
- name: Install Dependencies
run: |
if [ "${{ matrix.name }}" = "centos9" -o "${{ matrix.name }}" = "centos10" ]; then
dnf_opts="--enablerepo=crb"
fi
if [ -f /etc/redhat-release ]; then
dnf -y install $dnf_opts \
git gcc meson expect python3 python3-six which \
pkgconf-pkg-config openssl-devel openssl xz \
nss-softokn nss-tools nss-softokn-devel \
softhsm opensc p11-kit-devel rpm-build nss-devel
elif [ -f /etc/debian_version ]; then
apt-get -q update
apt-get -yq install git gcc meson expect \
pkg-config libssl-dev openssl \
xz-utils libnss3 libnss3-tools libnss3-dev \
softhsm2 opensc p11-kit libp11-kit-dev p11-kit-modules
fi
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup
run: |
git config --global --add safe.directory \
/__w/pkcs11-provider/pkcs11-provider
git submodule update --init
meson setup builddir
- name: Distcheck
run: |
git config --global --add safe.directory \
/__w/pkcs11-provider/pkcs11-provider
git ls-files meson.build
meson dist --no-tests -C builddir
- name: RPM Build
if: ${{ matrix.name == 'fedora' }}
run: |
mkdir -p rpmbuild/SOURCES
cp builddir/meson-dist/pkcs11-provider*tar.xz rpmbuild/SOURCES/
rpmbuild --define "_topdir $PWD/rpmbuild" -ba --without=gpgcheck \
packaging/pkcs11-provider.spec