Travis enhancements
v3 cover Travis enhancements
Hi,
see
https://travis-ci.org/pevik-travis/ltp/builds/311256334
Changes v2->v3:
* Changing prefix directory to 'ltp-install'. Previous ltp failed, if repository was clonned to the root of home directory. Reported by Li Wang (thanks!).
Petr Vorel (5):
travis: Add build script and use it in travis
travis: Drop old compilers, add new ones
travis: Add 32-bit cross-compile builds
travis: Add out-of-tree build
travis: Install all dependencies + add build with minimal dependencies
.travis.packages_i386 | 9 ++++ .travis.packages_native | 18 ++++++++ .travis.yml | 87 +++++++++++++++++++++++++++----------- build.sh | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+), 24 deletions(-) create mode 100644 .travis.packages_i386 create mode 100644 .travis.packages_native create mode 100755 build.sh
Signature · 1 line
2.15.0
RFC PATCH v3 1/5 travis: Add build script and use it in travis
This script handles native build, 32-bit cross-compile build and out-of-tree build.
Script is for travis build, but can be used for local builds as well.
For usage run
./build.sh -h
--- .travis.yml | 2 +- build.sh | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100755 build.sh
.travis.yml +1 -1
@@ -72,4 +72,4 @@ notifications: email: secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU=" -script: make autotools && ./configure --prefix $HOME/ltp --with-open-posix-testsuite --with-realtime-testsuite && make -j$(getconf _NPROCESSORS_ONLN) && make -j$(getconf _NPROCESSORS_ONLN) install +script: ./build.sh
build.sh new file +110 -0
110 lines not on this page · raw message
Signature · 1 line
2.15.0
RFC PATCH v3 1/5 travis: Add build script and use it in travis
Hi!
Hi!
build.sh line 53
Quoted 9 lines
build.sh new file +9
-0+ cd $build + if ! $tree/configure $CONFIGURE_OPTS; then + echo "== ERROR: configure failed, config.log ==" + cat config.log + exit 1 + fi + + echo "== config.log ==" + cat config.log
I find this output to be a bit too verbose, frankly I do not remeber checking it content of the config.log ever.
build.sh line 56
Quoted 2 lines
build.sh new file +2
-0+ make $make_opts + make $make_opts DESTDIR="$PREFIX" SKIP_IDCHECK=1 install
^
Here you use spaces instead of tabs.
Quoted 6 lines
build.sh new file +6
-0+} + +build_in_tree() +{ + echo "=== autotools ===" + make autotools
build.sh line 72
Quoted 10 lines
build.sh new file +10
-0+ + echo "=== configure ===" + if ! ./configure $CONFIGURE_OPTS_IN_TREE $@; then + echo "== ERROR: configure failed, config.log ==" + cat config.log + exit 1 + fi + + echo "== config.log ==" + cat config.log
Here as well.
Quoted 27 lines
build.sh new file +27
-0+ echo "=== build ===" + make $MAKE_OPTS + + echo "=== install ===" + make $MAKE_OPTS install +} + +usage() +{ + cat << EOF +Usage: +$0 [ BUILD_TYPE ] +$0 -h|--help|help + +Options: +-h|--help|help Print this help + +BUILD TYPES: +32 32-bit in-tree build +native native in-tree build +out out-of-tree build + +Default build is native in-tree build. +EOF +} + +case "$1" in
build.sh line 110
Quoted 10 lines
build.sh new file +10
-0+ -h|--help|help) usage; exit 0;; + 32) build="build_32";; + out) build="build_out_tree";; + *) build="build_native";; +esac + +cd `dirname $0` +$build + +# vim: set ft=sh ts=4 sts=4 sw=4 noet:
I prefer not to clobber source code with this kind of editor hints.
Signature · 2 lines
Cyril Hrubis [email protected]
RFC PATCH v3 1/5 travis: Add build script and use it in travis
Hi Cyril,
thanks for your time!
Quoted 2 lines
I find this output to be a bit too verbose, frankly I do not remeber checking it content of the config.log ever.
It is verbose. The reason I added it is, that we can check that travis is doing what we want (e.g. header / library is really installed / not installed).
I didn't realize, that include/config.h would be enough and it's much smaller. But I suppose you don't want any output in case of successful configure run, do you?
Quoted 4 lines
build.sh line 56
Quoted 2 lines
build.sh new file +2
-0+ make $make_opts + make $make_opts DESTDIR="$PREFIX" SKIP_IDCHECK=1 install^
Here you use spaces instead of tabs.
Thanks. Copy & paste issue.
Quoted 19 lines
Quoted 6 lines
build.sh new file +6
-0+} + +build_in_tree() +{ + echo "=== autotools ===" + make autotoolsbuild.sh line 72
Quoted 10 lines
build.sh new file +10
-0+ + echo "=== configure ===" + if ! ./configure $CONFIGURE_OPTS_IN_TREE $@; then + echo "== ERROR: configure failed, config.log ==" + cat config.log + exit 1 + fi + + echo "== config.log ==" + cat config.logHere as well.
Quoted 3 lines
Quoted 1 line
+# vim: set ft=sh ts=4 sts=4 sw=4 noet:
I prefer not to clobber source code with this kind of editor hints.
OK.
Kind regards,
Petr
RFC PATCH v3 1/5 travis: Add build script and use it in travis
Hi!
Quoted 6 lines
Quoted 2 lines
I find this output to be a bit too verbose, frankly I do not remeber checking it content of the config.log ever.
It is verbose. The reason I added it is, that we can check that travis is doing what we want (e.g. header / library is really installed / not installed).
I didn't realize, thatinclude/config.hwould be enough and it's much smaller. But I suppose you don't want any output in case of successful configure run, do you?
Dumping config.h sounds good to me.
Signature · 2 lines
Cyril Hrubis [email protected]
RFC PATCH v3 1/5 travis: Add build script and use it in travis
In reply to Petr Vorelbuild.sh V3 works fine to me. Thanks!
Signature · 2 lines
Li Wang [email protected]
RFC PATCH v3 2/5 travis: Drop old compilers, add new ones
In reply to Petr VorelDropped: gcc 4.6, 4.7, 4.8 and clang 3.5, 3.8
Added: gcc 6, 7 and clang 4.0, 5.0
+ simplify code for clang 3.9 as distro trusty is default in travis since August 2017, see:
https://docs.travis-ci.com/user/reference/overview/
--- .travis.yml | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-)
.travis.yml +16 -33
@@ -2,27 +2,6 @@ language: c matrix: include: - - os: linux - compiler: gcc-4.6 - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['gcc-4.6'] - - - os: linux - compiler: gcc-4.7 - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['gcc-4.7'] - - - os: linux - compiler: gcc-4.8 - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['gcc-4.8'] - - os: linux compiler: gcc-4.9 addons:
@@ -45,28 +24,32 @@ matrix: packages: ['gcc-6'] - os: linux - compiler: clang-3.5 + compiler: gcc-7 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-7'] + + - os: linux + compiler: clang-3.9 addons: apt: - sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5'] - packages: ['clang-3.5'] + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-3.9'] + packages: ['clang-3.9'] - os: linux - compiler: clang-3.8 + compiler: clang-4.0 addons: apt: - sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8'] - packages: ['clang-3.8'] + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0'] + packages: ['clang-4.0'] - os: linux - compiler: clang-3.9 + compiler: clang-5.0 addons: apt: - sources: - - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" - key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key" - - 'ubuntu-toolchain-r-test' - packages: ['clang-3.9'] + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0'] + packages: ['clang-5.0'] notifications: email:
Signature · 1 line
2.15.0
RFC PATCH v3 3/5 travis: Add 32-bit cross-compile builds
In reply to Petr VorelChoosen gcc 4.9 and 6 (to use old and some quite new version).
--- .travis.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
.travis.yml +25 -1
@@ -3,6 +3,7 @@ language: c matrix: include: - os: linux + env: BUILD="native" compiler: gcc-4.9 addons: apt:
@@ -10,6 +11,7 @@ matrix: packages: ['gcc-4.9'] - os: linux + env: BUILD="native" compiler: gcc-5 addons: apt:
@@ -17,6 +19,7 @@ matrix: packages: ['gcc-5'] - os: linux + env: BUILD="native" compiler: gcc-6 addons: apt:
@@ -24,6 +27,7 @@ matrix: packages: ['gcc-6'] - os: linux + env: BUILD="native" compiler: gcc-7 addons: apt:
@@ -31,6 +35,7 @@ matrix: packages: ['gcc-7'] - os: linux + env: BUILD="native" compiler: clang-3.9 addons: apt:
@@ -38,6 +43,7 @@ matrix: packages: ['clang-3.9'] - os: linux + env: BUILD="native" compiler: clang-4.0 addons: apt:
@@ -45,14 +51,32 @@ matrix: packages: ['clang-4.0'] - os: linux + env: BUILD="native" compiler: clang-5.0 addons: apt: sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0'] packages: ['clang-5.0'] + - os: linux + env: BUILD="32" + compiler: gcc-4.9 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-4.9', 'gcc-4.9-multilib', 'linux-libc-dev:i386'] + + - os: linux + env: BUILD="32" + compiler: gcc-6 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-6', 'gcc-6-multilib', 'linux-libc-dev:i386'] + notifications: email: secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU=" -script: ./build.sh +before_install: +script: ./build.sh $BUILD
Signature · 1 line
2.15.0
RFC PATCH v3 4/5 travis: Add out-of-tree build
In reply to Petr Vorel--- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+)
.travis.yml +8 -0
@@ -74,6 +74,14 @@ matrix: sources: ['ubuntu-toolchain-r-test'] packages: ['gcc-6', 'gcc-6-multilib', 'linux-libc-dev:i386'] + - os: linux + env: BUILD="out" + compiler: gcc-7 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-7'] + notifications: email: secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU="
Signature · 1 line
2.15.0
RFC PATCH v3 5/5 travis: Install all dependencies + add build with minimal dependencies
In reply to Petr VorelCurrently travis has installed toolchain with libraries, glibc and kernel headers so some of the packages listed are already installed.
Install all dependencies (headers and libraries).
The only exception is selinux support on 32bit build as as libsepol1-dev:i386 conflict with libsepol1-dev for amd64, thus both cannot be installed.
During reinstallation for build with minimal dependencies we need to filter out some packages as toolchain package depends on it.
For minimal build chosen gcc 6 (relativelly recent gcc version, but not too new).
--- .travis.packages_i386 | 9 +++++++++ .travis.packages_native | 18 ++++++++++++++++++ .travis.yml | 44 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 .travis.packages_i386 create mode 100644 .travis.packages_native
.travis.packages_i386 new file +9 -0
@@ -0,0 +1,9 @@ +libacl1:i386 +libaio1:i386 +libcap2:i386 +libc6-dev-i386 +libc6:i386 +libkeyutils1:i386 +libnuma1:i386 +libssl-dev:i386 +libtirpc1:i386
.travis.packages_native new file +18 -0
@@ -0,0 +1,18 @@ +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 +34 -10
111 lines not on this page · raw message
Signature · 1 line
2.15.0
v3 cover Travis enhancements
In reply to Petr VorelHi!
Other than the minor nits the rest looks good, acked.
Signature · 2 lines
Cyril Hrubis [email protected]