@@ -2,34 +2,57 @@ name: CI
2
2
on : [push, pull_request]
3
3
4
4
jobs :
5
- ubuntu :
6
- runs-on : ubuntu-latest
7
- strategy :
8
- fail-fast : false
9
- matrix :
10
- name : [ubuntu-clang, ubuntu-gcc]
11
- include :
12
- - name : ubuntu-clang
13
- compiler : clang
14
- cflags : -Wall -Wextra -Werror -Wno-cast-align -Wno-unused-parameter -Wno-missing-braces
15
- - name : ubuntu-gcc
16
- compiler : gcc
17
- cflags : -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-restrict
18
- steps :
19
- - name : Checkout repository
20
- uses : actions/checkout@v2
21
- - name : Install dependencies
22
- run : |
23
- sudo apt-get update
24
- sudo apt-get install -y build-essential autopoint clang gcc docbook-{xsl,xml} libxml2-utils xml-core xsltproc lib{krb5,ini-config,keyutils,popt,selinux1,systemd,verto}-dev lib{nss,socket}-wrapper python3{,-colorama} valgrind krb5-{kdc,admin-server,kdc-ldap} ldap-utils slapd apparmor-utils
25
- - name : Silence AppArmor
26
- run : sudo aa-complain $(which slapd)
27
- - name : Setup
28
- run : |
29
- autoreconf -fiv
30
- ./configure
31
- - name : Build and test
32
- env :
33
- CFLAGS : ${{ matrix.cflags }}
34
- CC : ${{ matrix.compiler }}
35
- run : make -s distcheck DISTCHECK_CONFIGURE_FLAGS="CFLAGS=\"$CFLAGS\" CC=\"$CC\""
5
+ ci :
6
+ name : CI
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ fail-fast : false
10
+ matrix :
11
+ name : [fedora, debian]
12
+ compiler : [gcc, clang]
13
+ include :
14
+ - name : fedora
15
+ container : fedora:latest
16
+ - name : debian
17
+ container : debian:sid
18
+ container : ${{ matrix.container }}
19
+ steps :
20
+ - name : Install dependencies
21
+ run : |
22
+ if [ -f /etc/redhat-release ]; then
23
+ dnf -y install --setopt='tsflags=' ${{ matrix.compiler }} \
24
+ make autoconf automake libtool pkgconf-pkg-config \
25
+ gettext-devel openssl-devel popt-devel docbook-style-xsl \
26
+ xml-common libxslt krb5-workstation krb5-devel \
27
+ libini_config-devel nss_wrapper socket_wrapper systemd-devel \
28
+ libselinux-devel libverto-devel python3 python3-colorama \
29
+ krb5-server krb5-server-ldap openldap-servers openldap-clients \
30
+ which valgrind
31
+ elif [ -f /etc/debian_version ]; then
32
+ apt-get -q update
33
+ apt-get -yq install ${{ matrix.compiler }} make autoconf \
34
+ automake autotools-dev libtool pkg-config autopoint libssl-dev \
35
+ docbook-xsl docbook-xml libxml2-utils xml-core xsltproc \
36
+ libkrb5-dev libini-config-dev libkeyutils-dev libpopt-dev \
37
+ libselinux1-dev libsystemd-dev systemd-dev libverto-dev \
38
+ libnss-wrapper libsocket-wrapper python3 python3-colorama \
39
+ krb5-kdc krb5-admin-server krb5-kdc-ldap ldap-utils slapd \
40
+ valgrind
41
+ fi
42
+ - name : Checkout repository
43
+ uses : actions/checkout@v4
44
+ - name : Setup
45
+ run : |
46
+ autoreconf -fiv
47
+ ./configure
48
+ - name : Build and test
49
+ env :
50
+ CC : ${{ matrix.compiler }}
51
+ run : make -s distcheck DISTCHECK_CONFIGURE_FLAGS="CC=\"$CC\""
52
+ - uses : actions/upload-artifact@v4
53
+ if : failure()
54
+ with :
55
+ name : logs ${{ matrix.name }}, ${{ matrix.compiler }}
56
+ path : |
57
+ config.log
58
+ testdir
0 commit comments