blob: afadc3c25cc6a2385d1ad3f231cceb030f5dd84f [file] [log] [blame]
Petr Vorel2e5064f2020-02-07 11:22:40 +01001# Copyright (c) 2017-2020 Petr Vorel <pvorel@suse.cz>
2
Petr Vorel24519c12018-12-18 10:31:51 +01003sudo: required
Petr Vorel1ed52332017-01-11 13:42:29 +01004language: c
Petr Vorel24519c12018-12-18 10:31:51 +01005services:
6 - docker
Petr Vorel72a23be2018-01-26 19:51:16 +01007
Petr Vorelb6684332017-01-13 10:07:05 +01008matrix:
9 include:
Petr Vorel24519c12018-12-18 10:31:51 +010010 # 32 bit build
Petr Vorelb6684332017-01-13 10:07:05 +010011 - os: linux
Petr Vorel24519c12018-12-18 10:31:51 +010012 env: DISTRO=debian:stable VARIANT=i386
13 compiler: gcc
Petr Vorelb6684332017-01-13 10:07:05 +010014
Petr Vorel24519c12018-12-18 10:31:51 +010015 # cross compilation builds
Petr Vorelb6684332017-01-13 10:07:05 +010016 - os: linux
Petr Vorel1ba4f9d2020-01-08 09:18:40 +010017 env: DISTRO=debian:stable VARIANT=cross-compile ARCH=ppc64el TREE=out MAKE_INSTALL=1
Petr Vorel72a23be2018-01-26 19:51:16 +010018 compiler: powerpc64le-linux-gnu-gcc
Petr Vorelc24cbc12019-03-26 12:35:27 +010019
Petr Vorel24519c12018-12-18 10:31:51 +010020 - os: linux
Petr Vorel1ba4f9d2020-01-08 09:18:40 +010021 env: DISTRO=debian:stable VARIANT=cross-compile ARCH=arm64 TREE=out
Petr Vorel24519c12018-12-18 10:31:51 +010022 compiler: aarch64-linux-gnu-gcc
Petr Vorel72a23be2018-01-26 19:51:16 +010023
Petr Vorel62cf6622020-02-24 09:50:52 +010024 - os: linux
25 env: DISTRO=debian:stable VARIANT=cross-compile ARCH=s390x TREE=out
26 compiler: s390x-linux-gnu-gcc
27
Petr Vorel9ad0ef532019-12-10 21:13:19 +010028 # musl (native)
29 - os: linux
30 # Message: WARNING: xsltproc: cannot process http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
31 # doc/meson.build:70:1: ERROR: Problem encountered: Docs cannot be built: xsltproc does not work correctly
32 env: DISTRO=alpine:latest
33 compiler: gcc
34
Petr Vorel24519c12018-12-18 10:31:51 +010035 # build with minimal dependencies
36 - os: linux
Petr Vorel2e5064f2020-02-07 11:22:40 +010037 env: DISTRO=debian:stable VARIANT=minimal TREE=out
Petr Vorel24519c12018-12-18 10:31:51 +010038 compiler: clang
39
Clemens Famulla-Conrad3ee0f482019-11-18 11:57:35 +010040 # native non-intel
41 - os: linux
42 arch: ppc64le
43 compiler: gcc
44 env: DISTRO=debian:testing
45
Petr Vorelc24cbc12019-03-26 12:35:27 +010046 # other builds
47 - os: linux
Petr Vorel34f22582020-03-10 21:38:50 +010048 env: DISTRO=fedora:33 MAKE_INSTALL=1
Petr Vorelc24cbc12019-03-26 12:35:27 +010049 compiler: clang
50
51 - os: linux
Petr Vorel2e5064f2020-02-07 11:22:40 +010052 env: DISTRO=centos:6 TREE=out
Petr Vorelc24cbc12019-03-26 12:35:27 +010053 compiler: gcc
54
Petr Vorel24519c12018-12-18 10:31:51 +010055 - os: linux
56 env: DISTRO=debian:testing
57 compiler: gcc
Petr Vorelc24cbc12019-03-26 12:35:27 +010058
Petr Vorel24519c12018-12-18 10:31:51 +010059 - os: linux
Petr Vorelc24cbc12019-03-26 12:35:27 +010060 env: DISTRO=debian:oldstable
Petr Vorel24519c12018-12-18 10:31:51 +010061 compiler: clang
62
63 - os: linux
Petr Vorel13e9a4a2019-11-21 15:16:48 +010064 env: DISTRO=opensuse/tumbleweed
65 compiler: gcc
66
67 - os: linux
Petr Vorelc24cbc12019-03-26 12:35:27 +010068 env: DISTRO=opensuse/leap
69 compiler: gcc
70
71 - os: linux
Petr Vorel24519c12018-12-18 10:31:51 +010072 env: DISTRO=debian:oldstable
73 compiler: gcc
Petr Vorelc24cbc12019-03-26 12:35:27 +010074
Petr Vorel24519c12018-12-18 10:31:51 +010075 - os: linux
Petr Vorelc24cbc12019-03-26 12:35:27 +010076 env: DISTRO=debian:testing
Petr Vorel24519c12018-12-18 10:31:51 +010077 compiler: clang
78
79 - os: linux
Petr Vorel2e5064f2020-02-07 11:22:40 +010080 env: DISTRO=ubuntu:latest TREE=out
Petr Vorel24519c12018-12-18 10:31:51 +010081 compiler: gcc
82
83 - os: linux
84 env: DISTRO=ubuntu:xenial
85 compiler: gcc
86
87 - os: linux
Petr Vorel24519c12018-12-18 10:31:51 +010088 env: DISTRO=centos:latest
89 compiler: gcc
Petr Vorel1ed52332017-01-11 13:42:29 +010090
Petr Vorel3d43c232017-11-27 15:45:53 +010091before_install:
Petr Vorel7b71c972020-02-07 11:11:42 +010092 - df -hT
Petr Vorel24519c12018-12-18 10:31:51 +010093 - DIR="/usr/src/ltp"
94 - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile
Petr Vorel2e5064f2020-02-07 11:22:40 +010095 - cat Dockerfile
Petr Vorel24519c12018-12-18 10:31:51 +010096 - docker build -t ltp .
Petr Vorel2b103e42018-07-04 18:10:36 +020097
Petr Vorel24519c12018-12-18 10:31:51 +010098script:
99 - INSTALL="${DISTRO%%:*}"
Petr Vorele478b942019-03-01 11:29:28 +0100100 - INSTALL="${INSTALL%%/*}"
Petr Vorel1d5f1c82020-02-07 17:04:25 +0100101 - if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi
Petr Vorel24519c12018-12-18 10:31:51 +0100102 - if [ ! "$TREE" ]; then TREE="in"; fi
103 - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
Petr Vorel1ba4f9d2020-01-08 09:18:40 +0100104 - docker run -t ltp /bin/sh -c "cd travis && ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && ../build.sh -o $TREE -t $BUILD -c $CC $INSTALL_OPT"