• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2017-2020 Petr Vorel <pvorel@suse.cz>
2
3sudo: required
4language: c
5services:
6    - docker
7
8matrix:
9    include:
10        # 32 bit build
11        - os: linux
12          env: DISTRO=debian:stable VARIANT=i386
13          compiler: gcc
14
15        # cross compilation builds
16        - os: linux
17          env: DISTRO=debian:stable VARIANT=cross-compile ARCH=ppc64el TREE=out MAKE_INSTALL=1
18          compiler: powerpc64le-linux-gnu-gcc
19
20        - os: linux
21          env: DISTRO=debian:stable VARIANT=cross-compile ARCH=arm64 TREE=out
22          compiler: aarch64-linux-gnu-gcc
23
24        - os: linux
25          env: DISTRO=debian:stable VARIANT=cross-compile ARCH=s390x TREE=out
26          compiler: s390x-linux-gnu-gcc
27
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
35        # build with minimal dependencies
36        - os: linux
37          env: DISTRO=debian:stable VARIANT=minimal TREE=out
38          compiler: clang
39
40        # native non-intel
41        - os: linux
42          arch: ppc64le
43          compiler: gcc
44          env: DISTRO=debian:testing
45
46        # other builds
47        - os: linux
48          env: DISTRO=fedora:rawhide MAKE_INSTALL=1
49          compiler: clang
50
51        - os: linux
52          env: DISTRO=centos:6 TREE=out
53          compiler: gcc
54
55        - os: linux
56          env: DISTRO=debian:testing
57          compiler: gcc
58
59        - os: linux
60          env: DISTRO=debian:oldstable
61          compiler: clang
62
63        - os: linux
64          env: DISTRO=opensuse/tumbleweed
65          compiler: gcc
66
67        - os: linux
68          env: DISTRO=opensuse/leap
69          compiler: gcc
70
71        - os: linux
72          env: DISTRO=debian:oldstable
73          compiler: gcc
74
75        - os: linux
76          env: DISTRO=debian:testing
77          compiler: clang
78
79        - os: linux
80          env: DISTRO=ubuntu:eoan TREE=out
81          compiler: gcc
82
83        - os: linux
84          env: DISTRO=ubuntu:xenial
85          compiler: gcc
86
87        - os: linux
88          env: DISTRO=centos:latest
89          compiler: gcc
90
91before_install:
92    - df -hT
93    - DIR="/usr/src/ltp"
94    - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile
95    - cat Dockerfile
96    - docker build -t ltp .
97
98script:
99    - INSTALL="${DISTRO%%:*}"
100    - INSTALL="${INSTALL%%/*}"
101    - if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi
102    - if [ ! "$TREE" ]; then TREE="in"; fi
103    - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
104
105    # Tumbleweed requires newer Docker version
106    - >
107        if [ "${DISTRO//*\/}" = "tumbleweed" -o "$INSTALL" = "fedora" ]; then
108            curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
109            sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
110            sudo apt-get update
111            sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
112        fi
113
114    - 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"
115