From c238287dcaf1334f0790ecefd14a67e4109fee14 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Mon, 28 Sep 2020 16:34:24 +0000 Subject: [PATCH] ci: add CentOS 8 based CI run Our CentOS based CI run is based on CentOS 7. CentOS 8 exists already for some time and CentOS 7 will probably go end of life at some point. This adds a CentOS 8 based CI run to be prepared for the time CentOS 7 goes away. Signed-off-by: Adrian Reber --- .github/workflows/centos-test.yml | 2 +- scripts/build/Dockerfile.centos8 | 56 +++++++++++++++++++++++++++++++ scripts/build/Makefile | 2 +- scripts/ci/Makefile | 2 +- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 scripts/build/Dockerfile.centos8 diff --git a/.github/workflows/centos-test.yml b/.github/workflows/centos-test.yml index 41b1f3a6ea..e14c2460b2 100644 --- a/.github/workflows/centos-test.yml +++ b/.github/workflows/centos-test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - target: [centos7] + target: [centos7, centos8] steps: - uses: actions/checkout@v2 diff --git a/scripts/build/Dockerfile.centos8 b/scripts/build/Dockerfile.centos8 new file mode 100644 index 0000000000..0b658d5fa3 --- /dev/null +++ b/scripts/build/Dockerfile.centos8 @@ -0,0 +1,56 @@ +FROM registry.centos.org/centos/centos:8 + +ARG CC=gcc +ARG ENV1=FOOBAR + +RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf-plugins-core +RUN yum config-manager --set-enabled PowerTools +RUN yum install -y --allowerasing \ + asciidoc \ + ccache \ + coreutils \ + chkconfig \ + diffutils \ + findutils \ + gcc \ + git \ + gnutls-devel \ + iproute \ + iptables \ + libaio-devel \ + libasan \ + libcap-devel \ + libnet-devel \ + libnl3-devel \ + libselinux-devel \ + make \ + procps-ng \ + protobuf-c-devel \ + protobuf-devel \ + python3-devel \ + python3-flake8 \ + python3-PyYAML \ + python3-future \ + python3-protobuf \ + python3-pip \ + sudo \ + tar \ + which \ + xmlto + +RUN alternatives --set python /usr/bin/python3 +ENV PYTHON=python3 + +COPY . /criu +WORKDIR /criu + +ENV CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes +RUN mv .ccache /tmp && make mrproper && ccache -sz && \ + date && make -j $(nproc) CC="$CC" && date && ccache -s + +# The rpc test cases are running as user #1000, let's add the user +RUN adduser -u 1000 test + +RUN pip3 install junit_xml + +RUN make -C test/zdtm -j $(nproc) diff --git a/scripts/build/Makefile b/scripts/build/Makefile index 0fe4663032..85bbf2010c 100644 --- a/scripts/build/Makefile +++ b/scripts/build/Makefile @@ -1,4 +1,4 @@ -ARCHES := x86_64 fedora-asan fedora-rawhide centos7 armv7hf +ARCHES := x86_64 fedora-asan fedora-rawhide centos7 armv7hf centos8 TARGETS := $(ARCHES) alpine TARGETS_CLANG := $(addsuffix $(TARGETS),-clang) CONTAINER_RUNTIME := docker diff --git a/scripts/ci/Makefile b/scripts/ci/Makefile index b75314a0a3..ffa78446a2 100644 --- a/scripts/ci/Makefile +++ b/scripts/ci/Makefile @@ -11,7 +11,7 @@ ifdef CLANG target-suffix = -clang endif -TARGETS := alpine fedora-rawhide centos7 +TARGETS := alpine fedora-rawhide centos7 centos8 ZDTM_OPTIONS := UNAME := $(shell uname -m)