Perform package tests in Travis CI
cover Perform package tests in Travis CI
Changelog: v0->v1:
* The "cbuild: Properly create tarball for SuSE" patch was abandoned as no one is interested by scripts behavior when being ran by root.
* Patch "travis: Add RedHat and SuSE rpmbuild support" "buildlib/package-build-test" script to skip build tests when being ran outside travis (the actual check is whether we are already running inside a container or not).
* In the patch "travis: Test Debian packaging under artful container" removed as no longer needed installations: debhelper, dh-systemd, fakeroot
-----------------------------------------------------------------------------
This patchset comes from Alaa and he adds to Travis CI ability to reuse our cbuild script to build various packages.
The PR is https://github.com/linux-rdma/rdma-core/pull/241
The change to SuSE Tumbleweed wasn't straightforward and can be done as a followup patch.
Thanks
Alaa Hleihel (3):
travis: Add RedHat and SuSE rpmbuild support buildlib/cbuild: Add Ubuntu artful
travis: Test Debian packaging under artful container
.travis.yml | 7 ++++--- buildlib/cbuild | 7 +++++++ buildlib/package-build-test | 21 +++++++++++++++++++++ buildlib/travis-build | 14 -------------- 4 files changed, 32 insertions(+), 17 deletions(-) create mode 100755 buildlib/package-build-test
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
PATCH 1/3 travis: Add RedHat and SuSE rpmbuild support
From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/[email protected]>
Provide a new script for testing rpmbuild under RedHat and SuSE environments which validates both of the suse/rdma-core.spec and redhat/rdma-core.spec spec files.
The script performs the RPM package build test by utilizing the existing cbuild tool.
--- .travis.yml | 4 ++++ buildlib/package-build-test | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 buildlib/package-build-test
.travis.yml +4 -0
@@ -42,6 +42,9 @@ addons: - gcc-multilib - lib32gcc-7-dev +service: + - docker + before_script: - export LATEST_GCC_LINARO_URL=`wget -qO - https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/ | grep -o '<a href=['"'"'"].*gcc-linaro-.*x86_64_aarch64-linux-gnu.tar.xz['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'` - export LATEST_GCC_LINARO_TAR=`basename $LATEST_GCC_LINARO_URL`
@@ -51,6 +54,7 @@ before_script: script: - buildlib/travis-build - buildlib/travis-checkpatch + - buildlib/package-build-test - buildlib/github-release deploy: # Deploy assets to Github releases
buildlib/package-build-test new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +# fail on errors +set -e +# be verbose +set -x + +# Do not run these tests if we are already inside a container +if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then + echo "We are running in a container, skipping ..." + exit 0 +fi + +for OS in centos7 opensuse-42.3 +do + echo + echo "Checking package build for ${OS} ...." + echo + buildlib/cbuild build-images ${OS} + buildlib/cbuild pkg ${OS} +done
Signature · 6 lines
2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/3 buildlib/cbuild: Add Ubuntu artful
In reply to a message not in the archiveFrom: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/[email protected]>
This patch adds Ubuntu17.10 artful, that comes with GCC 7
--- buildlib/cbuild | 7 +++++++ 1 file changed, 7 insertions(+)
buildlib/cbuild +7 -0
@@ -181,6 +181,12 @@ class xenial(APTEnvironment): name = "ubuntu-16.04"; aliases = {"xenial"}; +class artful(APTEnvironment): + docker_parent = "ubuntu:17.10" + pkgs = xenial.pkgs + name = "ubuntu-17.10"; + aliases = {"artful"}; + class jessie(APTEnvironment): docker_parent = "debian:8" pkgs = xenial.pkgs;
@@ -325,6 +331,7 @@ environments = [centos6(), travis(), trusty(), xenial(), + artful(), jessie(), stretch(), fc26(),
Signature · 6 lines
2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/3 travis: Test Debian packaging under artful container
In reply to a message not in the archiveFrom: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/[email protected]>
This will be compiled with GCC 7 coming with Ubuntu artful.
Also, remove installations of debian helpers from addons->apt list in .travis.yml file as they are no longer required.
--- .travis.yml | 3 --- buildlib/package-build-test | 2 +- buildlib/travis-build | 14 -------------- 3 files changed, 1 insertion(+), 18 deletions(-)
.travis.yml +0 -3
@@ -21,9 +21,6 @@ addons: - build-essential - clang-4.0 - cmake - - debhelper - - dh-systemd - - fakeroot - gcc - gcc-7 - git
buildlib/package-build-test +1 -1
@@ -11,7 +11,7 @@ if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then exit 0 fi -for OS in centos7 opensuse-42.3 +for OS in centos7 opensuse-42.3 artful do echo echo "Checking package build for ${OS} ...."
buildlib/travis-build +0 -14
@@ -45,17 +45,3 @@ rm CMakeCache.txt CC=clang-4.0 CFLAGS=-Werror cmake -GNinja .. ninja cp ../util/udma_barrier.h.old ../util/udma_barrier.h - -# Finally run through gcc-7 64 bit through the debian packaging This gives a -# good clue if patches are changing packaging related things, the RPM stuff -# will have to be audited by hand. - -# When running cmake through debian/rules it is hard to set -Werror, -# instead force it on by changing the CMakeLists.txt -cd .. -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake -sed -i -e 's/-DCMAKE_BUILD_TYPE=Release//g' debian/rules -sed -i -e 's/ninja \(.*\)-v/ninja \1/g' debian/rules - -CC=gcc-7 debian/rules build -fakeroot debian/rules binary
Signature · 6 lines
2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171105144503.32709-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Re: [PATCH rdma-core v1 3/3] travis: Test Debian packaging under artful container
buildlib/travis-build rm CMakeCache.txt · line 56
Quoted 8 lines · Leon Romanovsky
buildlib/travis-build +0
-8-# Finally run through gcc-7 64 bit through the debian packaging This gives a -# good clue if patches are changing packaging related things, the RPM stuff -# will have to be audited by hand. - -# When running cmake through debian/rules it is hard to set -Werror, -# instead force it on by changing the CMakeLists.txt -cd .. -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
Loosing this stuff seems like a problem though. We need to make sure the package builds run with -Werror or travis will not flag new warnings.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171106021737.GC26011-uk2M96/[email protected]
Re: [PATCH rdma-core v1 3/3] travis: Test Debian packaging under artful container
Quoted 13 lines · Jason Gunthorpe
buildlib/travis-build rm CMakeCache.txt · line 56
Quoted 8 lines · Leon Romanovsky
buildlib/travis-build +0
-8-# Finally run through gcc-7 64 bit through the debian packaging This gives a -# good clue if patches are changing packaging related things, the RPM stuff -# will have to be audited by hand. - -# When running cmake through debian/rules it is hard to set -Werror, -# instead force it on by changing the CMakeLists.txt -cd .. -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmakeLoosing this stuff seems like a problem though. We need to make sure the package builds run with -Werror or travis will not flag new warnings.
We still have compilation tests with -Werror in buildlib/travis-build (clang, 32 bit, arm, etc..). If that is not enough, I think we can pass the -Werror to rpmbuild via CFLAGS environment variable:
CFLAGS="-Werror" rpmbuild ............
What do you think ?
Regards,
Alaa
Quoted 5 lines
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 68f08161-0ecf-17f7-f0fc-bc18b66fc4fa-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Re: [PATCH rdma-core v1 3/3] travis: Test Debian packaging under artful container
Quoted 17 lines · Alaa Hleihel
Quoted 13 lines · Jason Gunthorpe
buildlib/travis-build rm CMakeCache.txt · line 56
Quoted 8 lines · Leon Romanovsky
buildlib/travis-build +0
-8-# Finally run through gcc-7 64 bit through the debian packaging This gives a -# good clue if patches are changing packaging related things, the RPM stuff -# will have to be audited by hand. - -# When running cmake through debian/rules it is hard to set -Werror, -# instead force it on by changing the CMakeLists.txt -cd .. -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmakeLoosing this stuff seems like a problem though. We need to make sure the package builds run with -Werror or travis will not flag new warnings.
Quoted 2 lines
We still have compilation tests with -Werror in buildlib/travis-build (clang, 32 bit, arm, etc..). If that is not enough,
It is not enough. All compilation tests must be run with -Werror and if you move the gcc-7 test then you have to keep the -Werror
Quoted 2 lines
I think we can pass the -Werror to rpmbuild via CFLAGS environment variable:
CFLAGS="-Werror" rpmbuild ............
If that works properly it would be fine.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 20 lines · Leon Romanovsky
Changelog:
v0->v1:
* The "cbuild: Properly create tarball for SuSE" patch was abandoned as no one is interested by scripts behavior when being ran by root.
* Patch "travis: Add RedHat and SuSE rpmbuild support" "buildlib/package-build-test" script to skip build tests when being ran outside travis (the actual check is whether we are already running inside a container or not).
* In the patch "travis: Test Debian packaging under artful container" removed as no longer needed installations: debhelper, dh-systemd, fakeroot-----------------------------------------------------------------------------
This patchset comes from Alaa and he adds to Travis CI ability to reuse our cbuild script to build various packages.
The PR is https://github.com/linux-rdma/rdma-core/pull/241
The change to SuSE Tumbleweed wasn't straightforward and can be done as a followup patch.
Quoted 8 lines
Thanks
Cc Benjamin Drung <[email protected]>Cc Nicolas Morey-Chaisemartin <[email protected]>Alaa Hleihel (3):
travis: Add RedHat and SuSE rpmbuild support
buildlib/cbuild: Add Ubuntu artful
I will take the two patches above, because they are not controversial and resend the third one.
Thanks
Quoted 12 lines
travis: Test Debian packaging under artful container
.travis.yml | 7 ++++--- buildlib/cbuild | 7 +++++++ buildlib/package-build-test | 21 +++++++++++++++++++++ buildlib/travis-build | 14 -------------- 4 files changed, 32 insertions(+), 17 deletions(-) create mode 100755 buildlib/package-build-test--
2.15.0