1# Copyright (c) 2017-2021 Petr Vorel <pvorel@suse.cz> 2 3dist: bionic 4sudo: required 5language: c 6services: 7 - docker 8 9matrix: 10 include: 11 # 32 bit build 12 - os: linux 13 env: DISTRO=debian:stable VARIANT=i386 14 compiler: gcc 15 16 # cross compilation builds 17 - os: linux 18 env: DISTRO=debian:stable VARIANT=cross-compile ARCH=ppc64el TREE=out MAKE_INSTALL=1 19 compiler: powerpc64le-linux-gnu-gcc 20 21 - os: linux 22 env: DISTRO=debian:stable VARIANT=cross-compile ARCH=arm64 TREE=out 23 compiler: aarch64-linux-gnu-gcc 24 25 - os: linux 26 env: DISTRO=debian:stable VARIANT=cross-compile ARCH=s390x TREE=out 27 compiler: s390x-linux-gnu-gcc 28 29 # musl (native) 30 - os: linux 31 # Message: WARNING: xsltproc: cannot process http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl 32 # doc/meson.build:70:1: ERROR: Problem encountered: Docs cannot be built: xsltproc does not work correctly 33 env: DISTRO=alpine:latest METADATA=asciidoctor 34 compiler: gcc 35 36 # build with minimal dependencies 37 - os: linux 38 env: DISTRO=debian:stable VARIANT=minimal TREE=out 39 compiler: clang 40 41 # other builds 42 - os: linux 43 env: DISTRO=fedora:latest MAKE_INSTALL=1 CONTAINER=podman METADATA=asciidoctor-pdf 44 compiler: clang 45 46 - os: linux 47 env: DISTRO=centos:7 TREE=out METADATA=asciidoc-pdf 48 compiler: gcc 49 50 - os: linux 51 env: DISTRO=debian:testing METADATA=asciidoctor-pdf 52 compiler: gcc 53 54 - os: linux 55 env: DISTRO=debian:oldstable METADATA=asciidoc-pdf 56 compiler: clang 57 58 - os: linux 59 env: DISTRO=opensuse/tumbleweed CONTAINER=podman METADATA=asciidoctor 60 compiler: gcc 61 62 - os: linux 63 env: DISTRO=opensuse/leap METADATA=asciidoc-pdf 64 compiler: gcc 65 66 - os: linux 67 env: DISTRO=debian:oldstable METADATA=asciidoctor 68 compiler: gcc 69 70 - os: linux 71 env: DISTRO=debian:testing METADATA=asciidoc-pdf 72 compiler: clang 73 74 - os: linux 75 env: DISTRO=ubuntu:groovy TREE=out METADATA=asciidoctor 76 compiler: gcc 77 78 - os: linux 79 env: DISTRO=ubuntu:xenial METADATA=asciidoc-pdf 80 compiler: gcc 81 82 - os: linux 83 env: DISTRO=centos:latest METADATA=asciidoctor 84 compiler: gcc 85 86before_install: 87 - CONTAINER="${CONTAINER:-docker}" 88 # distros with glibc >=2.33 require podman and newest runc due docker faccessat2 incompatibility 89 - > 90 if [ "$CONTAINER" = "podman" ]; then 91 # podman 92 CONTAINER_ARGS="--runtime=/usr/bin/runc" 93 . /etc/os-release 94 sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" 95 wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add - 96 sudo apt update 97 sudo apt -y install podman slirp4netns 98 99 # runc 100 sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.0.0-rc93/runc.amd64 -o /usr/bin/runc 101 sudo chmod +x /usr/bin/runc 102 fi 103 104 # Docker Hub pull rate limit workaround for docker 105 - > 106 if [ "$CONTAINER" = "docker" ]; then 107 conf="/etc/docker/daemon.json" 108 tmp=$(mktemp) 109 sudo jq '."registry-mirrors" += ["https://mirror.gcr.io"]' $conf > $tmp 110 sudo mv $tmp $conf 111 sudo systemctl daemon-reload 112 sudo systemctl restart docker 113 fi 114 - $CONTAINER info 115 116 # ltp 117 - DIR="/usr/src/ltp" 118 - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile 119 - cat Dockerfile 120 - $CONTAINER build $CONTAINER_ARGS -t ltp . 121 122script: 123 - INSTALL="${DISTRO%%:*}" 124 - INSTALL="${INSTALL%%/*}" 125 - if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi 126 - if [ "$METADATA" = "asciidoc-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoc --enable-metadata-pdf"; fi 127 - if [ "$METADATA" = "asciidoctor" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor"; fi 128 - if [ "$METADATA" = "asciidoctor-pdf" ]; then CONFIGURE_OPT_EXTRA="--with-metadata-generator=asciidoctor --enable-metadata-pdf"; fi 129 - if [ ! "$TREE" ]; then TREE="in"; fi 130 - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac 131 - $CONTAINER run $CONTAINER_ARGS -t ltp /bin/sh -c "cd travis && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CONFIGURE_OPT_EXTRA=\"$CONFIGURE_OPT_EXTRA\" ../build.sh -o $TREE -t $BUILD -c $CC $INSTALL_OPT" 132