[1/9] travis: add a job to test on the fedora rawhide

Submitted by Andrei Vagin on Sept. 29, 2017, 10:41 p.m.

Details

Message ID 20170929224145.6764-1-avagin@openvz.org
State New
Series "Series without cover letter"
Headers show

Commit Message

Andrei Vagin Sept. 29, 2017, 10:41 p.m.
From: Andrei Vagin <avagin@virtuozzo.com>

This job is optional and it don't affect the status of a whole job.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 .travis.yml                                                |  6 +++++-
 scripts/build/Dockerfile.aarch64.tmpl                      |  1 +
 scripts/build/Dockerfile.armv7hf.tmpl                      |  1 +
 scripts/build/Dockerfile.fedora-asan.hdr                   |  2 ++
 scripts/build/Dockerfile.fedora-asan.tmpl                  |  1 +
 scripts/build/Dockerfile.fedora-rawhide.hdr                |  1 +
 scripts/build/Dockerfile.fedora-rawhide.tmpl               |  1 +
 .../{Dockerfile.fedora-asan => Dockerfile.fedora.tmpl}     |  7 +++----
 scripts/build/Dockerfile.ppc64le.tmpl                      |  1 +
 scripts/build/Dockerfile.rawhide                           | 14 ++++++++++++++
 scripts/build/Dockerfile.s390x.tmpl                        |  1 +
 scripts/build/Dockerfile.x86_64.tmpl                       |  1 +
 scripts/build/Makefile                                     |  8 +++++---
 scripts/travis/Makefile                                    | 10 ++++------
 14 files changed, 41 insertions(+), 14 deletions(-)
 create mode 120000 scripts/build/Dockerfile.aarch64.tmpl
 create mode 120000 scripts/build/Dockerfile.armv7hf.tmpl
 create mode 100644 scripts/build/Dockerfile.fedora-asan.hdr
 create mode 120000 scripts/build/Dockerfile.fedora-asan.tmpl
 create mode 100644 scripts/build/Dockerfile.fedora-rawhide.hdr
 create mode 120000 scripts/build/Dockerfile.fedora-rawhide.tmpl
 rename scripts/build/{Dockerfile.fedora-asan => Dockerfile.fedora.tmpl} (70%)
 create mode 120000 scripts/build/Dockerfile.ppc64le.tmpl
 create mode 100644 scripts/build/Dockerfile.rawhide
 create mode 120000 scripts/build/Dockerfile.s390x.tmpl
 create mode 120000 scripts/build/Dockerfile.x86_64.tmpl

Patch hide | download patch | download mbox

diff --git a/.travis.yml b/.travis.yml
index eaa8401cf..b424b1287 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@  env:
   - TR_ARCH=local       GCOV=1
   - TR_ARCH=local       CLANG=1
   - TR_ARCH=alpine
-  - TR_ARCH=asan
+  - TR_ARCH=fedora-asan
   - TR_ARCH=x86_64
   - TR_ARCH=armv7hf
   - TR_ARCH=aarch64
@@ -18,6 +18,10 @@  env:
   - TR_ARCH=aarch64     CLANG=1
   - TR_ARCH=ppc64le     CLANG=1
   - TR_ARCH=alpine      CLANG=1
+  - TR_ARCH=fedora-rawhide
+matrix:
+  allow_failures:
+    - env: TR_ARCH=fedora-rawhide
 script:
   - sudo make CCACHE=1 -C scripts/travis $TR_ARCH
 after_success:
diff --git a/scripts/build/Dockerfile.aarch64.tmpl b/scripts/build/Dockerfile.aarch64.tmpl
new file mode 120000
index 000000000..cb804790e
--- /dev/null
+++ b/scripts/build/Dockerfile.aarch64.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.tmpl
\ No newline at end of file
diff --git a/scripts/build/Dockerfile.armv7hf.tmpl b/scripts/build/Dockerfile.armv7hf.tmpl
new file mode 120000
index 000000000..cb804790e
--- /dev/null
+++ b/scripts/build/Dockerfile.armv7hf.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.tmpl
\ No newline at end of file
diff --git a/scripts/build/Dockerfile.fedora-asan.hdr b/scripts/build/Dockerfile.fedora-asan.hdr
new file mode 100644
index 000000000..328af2433
--- /dev/null
+++ b/scripts/build/Dockerfile.fedora-asan.hdr
@@ -0,0 +1,2 @@ 
+FROM fedora:latest
+ENV ASAN=1
diff --git a/scripts/build/Dockerfile.fedora-asan.tmpl b/scripts/build/Dockerfile.fedora-asan.tmpl
new file mode 120000
index 000000000..e4c40309c
--- /dev/null
+++ b/scripts/build/Dockerfile.fedora-asan.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.fedora.tmpl
\ No newline at end of file
diff --git a/scripts/build/Dockerfile.fedora-rawhide.hdr b/scripts/build/Dockerfile.fedora-rawhide.hdr
new file mode 100644
index 000000000..d6d9ab7e2
--- /dev/null
+++ b/scripts/build/Dockerfile.fedora-rawhide.hdr
@@ -0,0 +1 @@ 
+FROM fedora:rawhide
diff --git a/scripts/build/Dockerfile.fedora-rawhide.tmpl b/scripts/build/Dockerfile.fedora-rawhide.tmpl
new file mode 120000
index 000000000..e4c40309c
--- /dev/null
+++ b/scripts/build/Dockerfile.fedora-rawhide.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.fedora.tmpl
\ No newline at end of file
diff --git a/scripts/build/Dockerfile.fedora-asan b/scripts/build/Dockerfile.fedora.tmpl
similarity index 70%
rename from scripts/build/Dockerfile.fedora-asan
rename to scripts/build/Dockerfile.fedora.tmpl
index 13aad28a0..38a0e54e6 100644
--- a/scripts/build/Dockerfile.fedora-asan
+++ b/scripts/build/Dockerfile.fedora.tmpl
@@ -1,4 +1,3 @@ 
-FROM fedora:latest
 ARG CC=gcc
 ARG ENV1=FOOBAR
 
@@ -10,7 +9,7 @@  COPY . /criu
 WORKDIR /criu
 
 ENV CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
-RUN mv .ccache /tmp; make mrproper; ccache -s; \
-	date; make -j $(nproc) ASAN=1 CC="$CC"; date
-RUN make ASAN=1 -C test/zdtm -j $(nproc)
+RUN mv .ccache /tmp && make mrproper && ccache -s && ccache -z && \
+	date && make -j $(nproc) CC="$CC" && date && ccache -s
+RUN make -C test/zdtm -j $(nproc)
 
diff --git a/scripts/build/Dockerfile.ppc64le.tmpl b/scripts/build/Dockerfile.ppc64le.tmpl
new file mode 120000
index 000000000..cb804790e
--- /dev/null
+++ b/scripts/build/Dockerfile.ppc64le.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.tmpl
\ No newline at end of file
diff --git a/scripts/build/Dockerfile.rawhide b/scripts/build/Dockerfile.rawhide
new file mode 100644
index 000000000..b5080d416
--- /dev/null
+++ b/scripts/build/Dockerfile.rawhide
@@ -0,0 +1,14 @@ 
+FROM fedora:rawhide
+
+ARG CC=gcc
+
+RUN dnf install -y git gcc make
+RUN dnf install -y protobuf-devel protobuf-c-devel libaio-devel libcap-devel libnl3-devel libnet-devel
+RUN dnf install -y python ccache libasan findutils tar python-yaml protobuf-python iptables iproute python-ipaddr procps-ng
+
+COPY . /criu
+WORKDIR /criu
+RUN make mrproper && make -j $(nproc)
+
+RUN pip install protobuf
+RUN make -C test/zdtm/static env00
diff --git a/scripts/build/Dockerfile.s390x.tmpl b/scripts/build/Dockerfile.s390x.tmpl
new file mode 120000
index 000000000..cb804790e
--- /dev/null
+++ b/scripts/build/Dockerfile.s390x.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.tmpl
\ No newline at end of file
diff --git a/scripts/build/Dockerfile.x86_64.tmpl b/scripts/build/Dockerfile.x86_64.tmpl
new file mode 120000
index 000000000..cb804790e
--- /dev/null
+++ b/scripts/build/Dockerfile.x86_64.tmpl
@@ -0,0 +1 @@ 
+Dockerfile.tmpl
\ No newline at end of file
diff --git a/scripts/build/Makefile b/scripts/build/Makefile
index 234649afa..619973637 100644
--- a/scripts/build/Makefile
+++ b/scripts/build/Makefile
@@ -1,6 +1,6 @@ 
 QEMU_ARCHES := armv7hf aarch64 ppc64le s390x # require qemu
-ARCHES := $(QEMU_ARCHES) x86_64
-TARGETS := $(ARCHES) alpine fedora-asan
+ARCHES := $(QEMU_ARCHES) x86_64 fedora-asan fedora-rawhide
+TARGETS := $(ARCHES) alpine
 TARGETS_CLANG := $(addsuffix $(TARGETS),-clang)
 
 all: $(TARGETS) $(TARGETS_CLANG)
@@ -12,7 +12,7 @@  $(1): Dockerfile.$(1)
 endef
 $(foreach arch,$(ARCHES),$(eval $(call ARCH_DEP,$(arch))))
 
-Dockerfile.%: Dockerfile.%.hdr Dockerfile.tmpl
+Dockerfile.%: Dockerfile.%.hdr Dockerfile.%.tmpl
 	cat $^ > $@
 
 qemu-user-static:
@@ -37,6 +37,8 @@  $(1)-clang: $(1)
 endef
 $(foreach t,$(TARGETS),$(eval $(call CLANG_DEP,$(t))))
 
+Dockerfile.fedora-asan: override DOCKER_TMPL=Dockerfile.fedora.tmpl
+Dockerfile.fedora-rawhide: override DOCKER_TMPL=Dockerfile.fedora.tmpl
 %-clang:	DB_CC=--build-arg CC=clang-3.8
 %-clang:	DB_ENV=--build-arg ENV1=CCACHE_CPP2
 alpine-clang:	DB_CC=--build-arg CC=clang
diff --git a/scripts/travis/Makefile b/scripts/travis/Makefile
index e759ac25e..25b087df7 100644
--- a/scripts/travis/Makefile
+++ b/scripts/travis/Makefile
@@ -11,15 +11,13 @@  ifdef CLANG
 	target-suffix = -clang
 endif
 
-alpine:
-	$(MAKE) -C ../build $@$(target-suffix)
-	docker run --rm -it --privileged -v /lib/modules:/lib/modules criu-alpine ./test/zdtm.py run -t zdtm/static/env00
+TARGETS := fedora-asan alpine fedora-rawhide
 
-asan:
+$(TARGETS):
 	echo 'DOCKER_OPTS="--storage-driver=devicemapper"' > /etc/default/docker
 	restart docker
-	$(MAKE) -C ../build fedora-asan
-	docker run --rm -it --privileged -v /lib/modules:/lib/modules criu-fedora-asan ./scripts/travis/asan.sh
+	$(MAKE) -C ../build $@$(target-suffix)
+	docker run --rm -it --privileged -v /lib/modules:/lib/modules criu-$@ ./scripts/travis/asan.sh
 
 %:
 	$(MAKE) -C ../build $@$(target-suffix)