Codebase list iputils / edc955ff-f7c2-4ddb-aa72-1581cbb94b29/main .travis.yml
edc955ff-f7c2-4ddb-aa72-1581cbb94b29/main

Tree @edc955ff-f7c2-4ddb-aa72-1581cbb94b29/main (Download .tar.gz)

.travis.yml @edc955ff-f7c2-4ddb-aa72-1581cbb94b29/mainraw · history · blame

---
# Copyright (c) 2019-2020 Petr Vorel <pvorel@suse.cz>

sudo: required
language: c
services:
    - docker

matrix:
    include:
        # cross compilation
        # NOTE: cannot set cross compiler as compiler variable (meson tests also native build)
        - os: linux
          env: DISTRO=debian:unstable VARIANT=cross-compile ARCH=arm64
          compiler: gcc

        - os: linux
          env: DISTRO=debian:testing VARIANT=cross-compile ARCH=ppc64el
          compiler: gcc

        - os: linux
          env: DISTRO=debian:testing VARIANT=cross-compile ARCH=s390x
          compiler: gcc

        # musl (native)
        - os: linux
          # Message: WARNING: xsltproc: cannot process http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
          # doc/meson.build:70:1: ERROR: Problem encountered: Docs cannot be built: xsltproc does not work correctly
          env: DISTRO=alpine:latest EXTRA_BUILD_OPTS='-DBUILD_HTML_MANS=false -DBUILD_MANS=false'
          compiler: gcc

        # glibc (gcc/clang)
        - os: linux
          env: DISTRO=opensuse/tumbleweed
          compiler: gcc

        - os: linux
          env: DISTRO=opensuse/leap
          compiler: clang

        - os: linux
          env: DISTRO=ubuntu:xenial EXTRA_BUILD_OPTS='-DUSE_GETTEXT=false'
          compiler: clang

        - os: linux
          env: DISTRO=ubuntu:groovy
          compiler: gcc

        - os: linux
          env: DISTRO=fedora:latest
          compiler: clang

        - os: linux
          env: DISTRO=centos:7
          compiler: gcc

        - os: linux
          env: DISTRO=debian:testing
          compiler: gcc

        - os: linux
          env: DISTRO=debian:stable
          compiler: gcc

        - os: linux
          env: DISTRO=debian:oldstable
          compiler: clang

before_install:
    - DIR="/usr/src/iputils"
    - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile
    - echo "cat Dockerfile"; cat Dockerfile
    - docker build -t iputils .

script:
    - INSTALL="${DISTRO%%:*}"
    - INSTALL="${INSTALL%%/*}"
    - DISTRO_VERSION="${DISTRO#*:}"
    - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
    - docker run -it iputils /bin/sh -c "cd travis && DISTRO_VERSION=\"$DISTRO_VERSION\" ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CC=$CC EXTRA_BUILD_OPTS=\"$EXTRA_BUILD_OPTS\" ../build.sh"