Petr Vorel | 2e5064f | 2020-02-07 11:22:40 +0100 | [diff] [blame] | 1 | # Copyright (c) 2017-2020 Petr Vorel <pvorel@suse.cz> |
| 2 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 3 | sudo: required |
Petr Vorel | 1ed5233 | 2017-01-11 13:42:29 +0100 | [diff] [blame] | 4 | language: c |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 5 | services: |
| 6 | - docker |
Petr Vorel | 72a23be | 2018-01-26 19:51:16 +0100 | [diff] [blame] | 7 | |
Petr Vorel | b668433 | 2017-01-13 10:07:05 +0100 | [diff] [blame] | 8 | matrix: |
| 9 | include: |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 10 | # 32 bit build |
Petr Vorel | b668433 | 2017-01-13 10:07:05 +0100 | [diff] [blame] | 11 | - os: linux |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 12 | env: DISTRO=debian:stable VARIANT=i386 |
| 13 | compiler: gcc |
Petr Vorel | b668433 | 2017-01-13 10:07:05 +0100 | [diff] [blame] | 14 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 15 | # cross compilation builds |
Petr Vorel | b668433 | 2017-01-13 10:07:05 +0100 | [diff] [blame] | 16 | - os: linux |
Petr Vorel | 1ba4f9d | 2020-01-08 09:18:40 +0100 | [diff] [blame] | 17 | env: DISTRO=debian:stable VARIANT=cross-compile ARCH=ppc64el TREE=out MAKE_INSTALL=1 |
Petr Vorel | 72a23be | 2018-01-26 19:51:16 +0100 | [diff] [blame] | 18 | compiler: powerpc64le-linux-gnu-gcc |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 19 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 20 | - os: linux |
Petr Vorel | 1ba4f9d | 2020-01-08 09:18:40 +0100 | [diff] [blame] | 21 | env: DISTRO=debian:stable VARIANT=cross-compile ARCH=arm64 TREE=out |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 22 | compiler: aarch64-linux-gnu-gcc |
Petr Vorel | 72a23be | 2018-01-26 19:51:16 +0100 | [diff] [blame] | 23 | |
Petr Vorel | 62cf662 | 2020-02-24 09:50:52 +0100 | [diff] [blame] | 24 | - os: linux |
| 25 | env: DISTRO=debian:stable VARIANT=cross-compile ARCH=s390x TREE=out |
| 26 | compiler: s390x-linux-gnu-gcc |
| 27 | |
Petr Vorel | 9ad0ef53 | 2019-12-10 21:13:19 +0100 | [diff] [blame] | 28 | # 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 Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 35 | # build with minimal dependencies |
| 36 | - os: linux |
Petr Vorel | 2e5064f | 2020-02-07 11:22:40 +0100 | [diff] [blame] | 37 | env: DISTRO=debian:stable VARIANT=minimal TREE=out |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 38 | compiler: clang |
| 39 | |
Clemens Famulla-Conrad | 3ee0f48 | 2019-11-18 11:57:35 +0100 | [diff] [blame] | 40 | # native non-intel |
| 41 | - os: linux |
| 42 | arch: ppc64le |
| 43 | compiler: gcc |
| 44 | env: DISTRO=debian:testing |
| 45 | |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 46 | # other builds |
| 47 | - os: linux |
Petr Vorel | 34f2258 | 2020-03-10 21:38:50 +0100 | [diff] [blame] | 48 | env: DISTRO=fedora:33 MAKE_INSTALL=1 |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 49 | compiler: clang |
| 50 | |
| 51 | - os: linux |
Petr Vorel | 2e5064f | 2020-02-07 11:22:40 +0100 | [diff] [blame] | 52 | env: DISTRO=centos:6 TREE=out |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 53 | compiler: gcc |
| 54 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 55 | - os: linux |
| 56 | env: DISTRO=debian:testing |
| 57 | compiler: gcc |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 58 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 59 | - os: linux |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 60 | env: DISTRO=debian:oldstable |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 61 | compiler: clang |
| 62 | |
| 63 | - os: linux |
Petr Vorel | 13e9a4a | 2019-11-21 15:16:48 +0100 | [diff] [blame] | 64 | env: DISTRO=opensuse/tumbleweed |
| 65 | compiler: gcc |
| 66 | |
| 67 | - os: linux |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 68 | env: DISTRO=opensuse/leap |
| 69 | compiler: gcc |
| 70 | |
| 71 | - os: linux |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 72 | env: DISTRO=debian:oldstable |
| 73 | compiler: gcc |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 74 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 75 | - os: linux |
Petr Vorel | c24cbc1 | 2019-03-26 12:35:27 +0100 | [diff] [blame] | 76 | env: DISTRO=debian:testing |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 77 | compiler: clang |
| 78 | |
| 79 | - os: linux |
Petr Vorel | 2e5064f | 2020-02-07 11:22:40 +0100 | [diff] [blame] | 80 | env: DISTRO=ubuntu:latest TREE=out |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 81 | compiler: gcc |
| 82 | |
| 83 | - os: linux |
| 84 | env: DISTRO=ubuntu:xenial |
| 85 | compiler: gcc |
| 86 | |
| 87 | - os: linux |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 88 | env: DISTRO=centos:latest |
| 89 | compiler: gcc |
Petr Vorel | 1ed5233 | 2017-01-11 13:42:29 +0100 | [diff] [blame] | 90 | |
Petr Vorel | 3d43c23 | 2017-11-27 15:45:53 +0100 | [diff] [blame] | 91 | before_install: |
Petr Vorel | 7b71c97 | 2020-02-07 11:11:42 +0100 | [diff] [blame] | 92 | - df -hT |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 93 | - DIR="/usr/src/ltp" |
| 94 | - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile |
Petr Vorel | 2e5064f | 2020-02-07 11:22:40 +0100 | [diff] [blame] | 95 | - cat Dockerfile |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 96 | - docker build -t ltp . |
Petr Vorel | 2b103e4 | 2018-07-04 18:10:36 +0200 | [diff] [blame] | 97 | |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 98 | script: |
| 99 | - INSTALL="${DISTRO%%:*}" |
Petr Vorel | e478b94 | 2019-03-01 11:29:28 +0100 | [diff] [blame] | 100 | - INSTALL="${INSTALL%%/*}" |
Petr Vorel | 1d5f1c8 | 2020-02-07 17:04:25 +0100 | [diff] [blame] | 101 | - if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi |
Petr Vorel | 24519c1 | 2018-12-18 10:31:51 +0100 | [diff] [blame] | 102 | - if [ ! "$TREE" ]; then TREE="in"; fi |
| 103 | - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac |
Petr Vorel | 1ba4f9d | 2020-01-08 09:18:40 +0100 | [diff] [blame] | 104 | - 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" |