Docker based travis CI
v2 cover Docker based travis CI
Hi,
changes v1->v2 (mostly Cyril's suggestions for 3rd commit):
* generate docker files on the fly
* remove unused script travis/travis.sh (I wasn't able to put this file into docker, that's why it's its content in .travis.yml)
* simplify file names (@Cyril: using siple debian.sh instead of setup.debian.sh)
It looked to me easier to use symlinks in travis/ directory then add another variable. Now we see for each build compiler and distro + optional variant or tree:
https://travis-ci.org/pevik/ltp/builds/474844878
Kind regards,
Petr
Petr Vorel (3):
ver_linux: Print clang version
ver_linux: Add lsb_release -a
travis: Use docker based builds
.travis.packages_i386 | 9 -- .travis.packages_native | 18 --- .travis.yml | 149 +++++++++---------------- build.sh | 12 +- travis/centos.sh | 1 + travis/debian.cross-compile.aarch64.sh | 7 ++ travis/debian.cross-compile.ppc64le.sh | 7 ++ travis/debian.i386.sh | 19 ++++ travis/debian.minimal.sh | 19 ++++ travis/debian.sh | 35 ++++++ travis/fedora.sh | 12 ++ travis/opensuse.sh | 1 + travis/tumbleweed.sh | 21 ++++ travis/ubuntu.sh | 1 + ver_linux | 5 + 15 files changed, 189 insertions(+), 127 deletions(-) delete mode 100644 .travis.packages_i386 delete mode 100644 .travis.packages_native create mode 120000 travis/centos.sh create mode 100755 travis/debian.cross-compile.aarch64.sh create mode 100755 travis/debian.cross-compile.ppc64le.sh create mode 100755 travis/debian.i386.sh create mode 100755 travis/debian.minimal.sh create mode 100755 travis/debian.sh create mode 100755 travis/fedora.sh create mode 120000 travis/opensuse.sh create mode 100755 travis/tumbleweed.sh create mode 120000 travis/ubuntu.sh
Signature · 1 line
2.19.2
PATCH v2 1/3 ver_linux: Print clang version
--- ver_linux | 1 + 1 file changed, 1 insertion(+)
ver_linux +1 -0
@@ -31,6 +31,7 @@ cat /proc/cmdline echo echo "Gnu C " `gcc --version 2>/dev/null | head -n 1` +echo "Clang " `clang --version 2>/dev/null | head -n 1` make --version 2>&1 | awk -F, '{print $1}' | awk \ '/GNU Make/{print "Gnu make ",$NF}'
Signature · 1 line
2.19.2
PATCH v2 2/3 ver_linux: Add lsb_release -a
In reply to Petr Vorel--- ver_linux | 4 ++++ 1 file changed, 4 insertions(+)
ver_linux +4 -0
@@ -19,6 +19,10 @@ if [ $? = 1 ]; then echo '/etc/issue:' cat /etc/issue 2> /dev/null fi +if [ $? = 1 ]; then + echo 'lsb_release -a' + lsb_release -a 2> /dev/null +fi echo echo 'uname:'
Signature · 1 line
2.19.2
PATCH v2 3/3 travis: Use docker based builds
In reply to Petr VorelPreviously we used 10 Trusty environment (VM) based travis jobs with different gcc and clang versions installed via ubuntu-toolchain-r apt repository.
We agreed that testing just different gcc/clang versions isn't enough, it'd be good to test also different glibc and kernel headers, which are on different distros. Therefore now we test 15 jobs based on various distros (Debian, Ubuntu, Fedora, openSUSE, centOS).
We still test both gcc/clang, out-of-tree and cross-compilation builds.
Disadvantage of this approach is that it's not obvious compiler and libc version. Travis C testing environment implementation prints compiler version ($CC) before installing actually used compiler via docker. Therefore run ver_linux printing version info and print $CC version in build.sh.
Implements: #448
--- .travis.packages_i386 | 9 -- .travis.packages_native | 18 --- .travis.yml | 149 +++++++++---------------- build.sh | 12 +- travis/centos.sh | 1 + travis/debian.cross-compile.aarch64.sh | 7 ++ travis/debian.cross-compile.ppc64le.sh | 7 ++ travis/debian.i386.sh | 19 ++++ travis/debian.minimal.sh | 19 ++++ travis/debian.sh | 35 ++++++ travis/fedora.sh | 12 ++ travis/opensuse.sh | 1 + travis/tumbleweed.sh | 21 ++++ travis/ubuntu.sh | 1 + 14 files changed, 184 insertions(+), 127 deletions(-) delete mode 100644 .travis.packages_i386 delete mode 100644 .travis.packages_native create mode 120000 travis/centos.sh create mode 100755 travis/debian.cross-compile.aarch64.sh create mode 100755 travis/debian.cross-compile.ppc64le.sh create mode 100755 travis/debian.i386.sh create mode 100755 travis/debian.minimal.sh create mode 100755 travis/debian.sh create mode 100755 travis/fedora.sh create mode 120000 travis/opensuse.sh create mode 100755 travis/tumbleweed.sh create mode 120000 travis/ubuntu.sh
.travis.packages_i386 deleted +0 -9
@@ -1,9 +0,0 @@ -libacl1:i386 -libaio1:i386 -libcap2:i386 -libc6-dev-i386 -libc6:i386 -libkeyutils1:i386 -libnuma1:i386 -libssl-dev:i386 -libtirpc1:i386
.travis.packages_native deleted +0 -18
@@ -1,18 +0,0 @@ -libacl1 -libacl1-dev -libaio-dev -libaio1 -libcap-dev -libcap2 -libc6 -libc6-dev -libkeyutils-dev -libkeyutils1 -libmm-dev -libnuma-dev -libnuma1 -libselinux1-dev -libsepol1-dev -libssl-dev -libtirpc1 -linux-libc-dev
.travis.yml +51 -98
175 lines not on this page · raw message
build.sh +10 -2
@@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2017 Petr Vorel <[email protected]> +# Copyright (c) 2017-2018 Petr Vorel <[email protected]> # Script for travis builds. # # TODO: Implement comparison of installed files. List of installed files can
@@ -16,7 +16,7 @@ CONFIGURE_OPTS_IN_TREE="--with-open-posix-testsuite --with-realtime-testsuite" # TODO: open posix testsuite is currently broken in out-tree-build. Enable it once it's fixed. CONFIGURE_OPTS_OUT_TREE="--with-realtime-testsuite" MAKE_OPTS="-j$(getconf _NPROCESSORS_ONLN)" -CC= +CC=gcc build_32() {
@@ -152,4 +152,12 @@ while getopts "c:ho:p:t:" opt; do done cd `dirname $0` + +echo "=== ver_linux ===" +./ver_linux +echo + +echo "=== compiler version ===" +$CC --version + eval build_$build $tree
travis/centos.sh new file +1 -0
@@ -0,0 +1 @@ +fedora.sh
travis/debian.cross-compile.aarch64.sh new file +7 -0
@@ -0,0 +1,7 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +apt install -y --no-install-recommends \ + gcc-aarch64-linux-gnu \ + libc6-dev-arm64-cross
travis/debian.cross-compile.ppc64le.sh new file +7 -0
@@ -0,0 +1,7 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +apt install -y --no-install-recommends \ + gcc-powerpc64le-linux-gnu \ + libc6-dev-ppc64el-cross
travis/debian.i386.sh new file +19 -0
@@ -0,0 +1,19 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +dpkg --add-architecture i386 +apt update + +apt install -y --no-install-recommends \ + linux-libc-dev:i386 \ + gcc-multilib \ + libacl1:i386 \ + libaio1:i386 \ + libcap2:i386 \ + libc6-dev-i386 \ + libc6:i386 \ + libkeyutils1:i386 \ + libnuma1:i386 \ + libssl-dev:i386 \ + libtirpc1:i386
travis/debian.minimal.sh new file +19 -0
@@ -0,0 +1,19 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +apt remove -y \ + libacl1-dev \ + libaio-dev \ + libaio1 \ + libcap-dev \ + libcap2 \ + libkeyutils-dev \ + libkeyutils1 \ + libmm-dev \ + libnuma-dev \ + libnuma1 \ + libselinux1-dev \ + libsepol1-dev \ + libssl-dev \ + libtirpc1
travis/debian.sh new file +35 -0
@@ -0,0 +1,35 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +apt update + +apt install -y --no-install-recommends \ + acl-dev \ + autoconf \ + automake \ + build-essential \ + debhelper \ + devscripts \ + clang \ + gcc \ + libacl1 \ + libacl1-dev \ + libaio-dev \ + libaio1 \ + libcap-dev \ + libcap2 \ + libc6 \ + libc6-dev \ + libkeyutils-dev \ + libkeyutils1 \ + libmm-dev \ + libnuma-dev \ + libnuma1 \ + libselinux1-dev \ + libsepol1-dev \ + libssl-dev \ + linux-libc-dev \ + lsb-release + +apt install libtirpc1 libtirpc3 || true
travis/fedora.sh new file +12 -0
@@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +yum -y install \ + autoconf \ + automake \ + make \ + clang \ + gcc \ + findutils \ + redhat-lsb-core
travis/opensuse.sh new file +1 -0
@@ -0,0 +1 @@ +tumbleweed.sh
travis/tumbleweed.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/sh +# Copyright (c) 2018 Petr Vorel <[email protected]> +set -e + +zypper --non-interactive install --no-recommends \ + autoconf \ + automake \ + clang \ + gcc \ + make \ + kernel-default-devel \ + keyutils-devel \ + libacl-devel \ + libaio-devel \ + libcap-devel \ + libnuma-devel \ + libopenssl-devel \ + libselinux-devel \ + libtirpc-devel \ + linux-glibc-devel \ + lsb-release
travis/ubuntu.sh new file +1 -0
@@ -0,0 +1 @@ +debian.sh
Signature · 1 line
2.19.2
PATCH v2 3/3 travis: Use docker based builds
Hi!
This version looks good to me, go ahead and push it.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 3/3 travis: Use docker based builds
Hi Cyril,
Quoted 2 lines
Hi!
This version looks good to me, go ahead and push it.
Merged.
Kind regards,
Petr
v2 cover Docker based travis CI
In reply to Petr VorelHi,
Quoted 1 line
https://travis-ci.org/pevik/ltp/builds/474854740
Fedora is somehow slow (~ 11-12 min) due big system update it does, but I'd keep it.
Altogether it takes ~25 min (ubuntu trusty environment took ~13-15 min).
Kind regards,
Petr