Run `make check` after the project is built in every runner.
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
sudo apt-mark hold grub-efi-amd64-bin grub-efi-amd64-signed
sudo apt-get update
sudo apt-get -y dist-upgrade
- sudo apt-get -y install ubuntu-dev-tools automake autopoint xsltproc gettext expect byacc libtool libbsd-dev pkgconf
+ sudo apt-get -y install ubuntu-dev-tools automake autopoint xsltproc gettext expect byacc libtool libbsd-dev pkgconf libcmocka-dev
sudo apt-get -y build-dep shadow
- name: configure
run: |
cd $d
./configure
make -j5
+ make check
container-build:
runs-on: ubuntu-latest
FROM "${OS_IMAGE}" AS build
-RUN apk add autoconf automake build-base byacc expect gettext-dev git \
- libbsd-dev libeconf-dev libtool libxslt pkgconf
+RUN apk add autoconf automake build-base byacc cmocka-dev expect gettext-dev \
+ git libbsd-dev libeconf-dev libtool libxslt pkgconf
COPY ./ /usr/local/src/shadow/
WORKDIR /usr/local/src/shadow/
RUN ./autogen.sh --without-selinux --disable-man --disable-nls --with-yescrypt
RUN make -kj4 || true
RUN make
+RUN make check
RUN make install
FROM scratch AS export
RUN apt-get update -y \
&& apt-get dist-upgrade -y
RUN apt-get build-dep shadow -y
-RUN apt-get install libbsd-dev pkgconf -y
+RUN apt-get install libbsd-dev libcmocka-dev pkgconf -y
COPY ./ /usr/local/src/shadow/
WORKDIR /usr/local/src/shadow/
RUN ./autogen.sh --without-selinux --enable-man --with-yescrypt
RUN make -kj4 || true
RUN make
+RUN make check
RUN make install
FROM scratch AS export
FROM "${OS_IMAGE}" AS build
-RUN dnf install -y dnf-plugins-core
+RUN dnf install -y dnf-plugins-core libcmocka-devel systemd-devel
RUN dnf builddep -y shadow-utils
COPY ./ /usr/local/src/shadow/
--with-group-name-max-length=32 --enable-lastlog --enable-logind=no
RUN make -kj4 || true
RUN make
+RUN make check
RUN make install
FROM scratch AS export