2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

travis: switch all arm related tests to real hardware

This switches all arm related tests (32bit and 64bit) to the aarch64
systems Travis provides. For arm32 we are running in a armv7hf container
on aarch64 with 'setarch linux32'.

The main changes are that docker on Travis aarch64 cannot use
'--privileged' as Travis is using unprivileged LXD containers to setup
the testing environment.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber
2019-11-04 08:58:54 +01:00
committed by Andrei Vagin
parent 075f1beaf7
commit eab8cf0775
9 changed files with 93 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
language: c
sudo: required
dist: xenial
dist: bionic
cache: ccache
services:
- docker
@@ -9,21 +9,12 @@ env:
- TR_ARCH=local CLANG=1
- TR_ARCH=local COMPAT_TEST=y
- TR_ARCH=local CLANG=1 COMPAT_TEST=y
- TR_ARCH=alpine
- TR_ARCH=fedora-asan
- TR_ARCH=x86_64
- TR_ARCH=x86_64 CLANG=1
- TR_ARCH=armv7hf
- TR_ARCH=ppc64le
- TR_ARCH=s390x
- TR_ARCH=armv7hf CLANG=1
- TR_ARCH=ppc64le CLANG=1
- TR_ARCH=alpine CLANG=1
- TR_ARCH=docker-test
- TR_ARCH=fedora-rawhide
- TR_ARCH=fedora-rawhide-aarch64
- TR_ARCH=centos
- TR_ARCH=podman-test
- TR_ARCH=openj9-test
matrix:
@@ -36,10 +27,47 @@ matrix:
arch: arm64
env: TR_ARCH=local CLANG=1
dist: bionic
- os: linux
arch: arm64
# This runs on aarch64 with 'setarch linux32'
env: TR_ARCH=armv7hf
dist: bionic
- os: linux
arch: arm64
# This runs on aarch64 with 'setarch linux32'
env: TR_ARCH=armv7hf CLANG=1
dist: bionic
- os: linux
arch: arm64
env: TR_ARCH=fedora-rawhide
dist: bionic
- os: linux
arch: amd64
env: TR_ARCH=fedora-rawhide
dist: xenial # test hangs on bionic
- os: linux
arch: amd64
env: TR_ARCH=podman-test
dist: bionic
- os: linux
arch: amd64
env: TR_ARCH=alpine CLANG=1
dist: xenial # test hangs on bionic
- os: linux
arch: amd64
env: TR_ARCH=alpine
dist: xenial # test hangs on bionic
- os: linux
arch: amd64
env: TR_ARCH=centos
dist: xenial # test hangs on bionic
- os: linux
arch: amd64
env: TR_ARCH=fedora-asan
dist: xenial # test hangs on bionic
allow_failures:
- env: TR_ARCH=docker-test
- env: TR_ARCH=fedora-rawhide
- env: TR_ARCH=fedora-rawhide-aarch64
- env: TR_ARCH=s390x
- env: TR_ARCH=local GCOV=1
script:

View File

@@ -1,3 +1 @@
FROM arm32v7/ubuntu:xenial
COPY scripts/build/qemu-user-static/usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
FROM arm32v7/ubuntu:bionic

View File

@@ -1 +1 @@
Dockerfile.tmpl
Dockerfile.linux32.tmpl

View File

@@ -1,3 +0,0 @@
FROM arm64v8/fedora:rawhide
COPY scripts/build/qemu-user-static/usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static

View File

@@ -1 +0,0 @@
Dockerfile.fedora.tmpl

View File

@@ -0,0 +1,47 @@
ARG CC=gcc
ARG ENV1=FOOBAR
RUN apt-get update && apt-get install -y \
ccache \
libnet-dev \
libnl-route-3-dev \
$CC \
bsdmainutils \
build-essential \
git-core \
iptables \
libaio-dev \
libcap-dev \
libgnutls28-dev \
libgnutls30 \
libnl-3-dev \
libprotobuf-c-dev \
libprotobuf-dev \
libselinux-dev \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python-minimal \
python-future
COPY . /criu
WORKDIR /criu
ENV CC="ccache $CC" CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
RUN uname -m && setarch linux32 uname -m && setarch --list
RUN mv .ccache /tmp && make mrproper && ccache -s && \
date && \
# Check single object build
setarch linux32 make -j $(nproc) CC="$CC" criu/parasite-syscall.o && \
# Compile criu
setarch linux32 make -j $(nproc) CC="$CC" && \
date && \
# Check that "make mrproper" works
setarch linux32 make mrproper && ! git clean -ndx --exclude=scripts/build \
--exclude=.config --exclude=test | grep .
# Compile tests
RUN date && setarch linux32 make -j $(nproc) CC="$CC" -C test/zdtm && date
#RUN make test/compel/handle_binary && ./test/compel/handle_binary

View File

@@ -1,5 +1,5 @@
QEMU_ARCHES := armv7hf ppc64le s390x fedora-rawhide-aarch64 # require qemu
ARCHES := $(QEMU_ARCHES) aarch64 x86_64 fedora-asan fedora-rawhide centos
QEMU_ARCHES := ppc64le s390x # require qemu
ARCHES := $(QEMU_ARCHES) aarch64 x86_64 fedora-asan fedora-rawhide centos armv7hf
TARGETS := $(ARCHES) alpine
TARGETS_CLANG := $(addsuffix $(TARGETS),-clang)
CONTAINER_RUNTIME := docker

View File

@@ -28,6 +28,8 @@ endef
export DOCKER_JSON
ifeq ($(UNAME),x86_64)
# On anything besides x86_64 Travis is running unprivileged LXD
# containers which do not support running docker with '--privileged'.
CONTAINER_OPTS := --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run
else
CONTAINER_OPTS := --rm -v /lib/modules:/lib/modules --tmpfs /run

View File

@@ -11,7 +11,7 @@ apt-get install -qq \
apt-get update -qq
apt-get install -qqy podman
apt-get install -qqy podman containernetworking-plugins
export SKIP_TRAVIS_TEST=1