* [PATCH 1/4] travis: build against multiple kernel versions
@ 2018-07-28 22:31 Marcelo Ricardo Leitner
2018-07-30 11:50 ` Neil Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marcelo Ricardo Leitner @ 2018-07-28 22:31 UTC (permalink / raw)
To: linux-sctp
With recent changes, configure is probing for kernel features before
enabling them in the library.
Now with this change, travis-ci will build the library against several
different kernels, allowing a better CI.
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
The comments in linux-build.sh are intentional. Place holders for next
steps.
.travis.yml | 17 ++++++++++++-----
.travis/linux-build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 5 deletions(-)
create mode 100755 .travis/linux-build.sh
diff --git a/.travis.yml b/.travis.yml
index 75d07aa0640d73d12321231ecce18aa407ce15f4..c0fb7c68c4977c7185cd05df1b88b6d552cfa59f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,17 @@
language: c
+addons:
+ apt:
+ packages:
+ - libelf-dev
script:
- - ./bootstrap
- && ./configure
- && make -j `/usr/bin/getconf _NPROCESSORS_ONLN`
- # ipv6 is not supported by Travis
- - make -C src/func_tests/ v4test
+ - ./.travis/linux-build.sh
+env:
+ - KERNEL=4.10
+ - KERNEL=4.11
+ - KERNEL=4.12
+ - KERNEL=4.13
+ - KERNEL=4.16
+ - KERNEL=4.17
compiler:
- gcc
- clang
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..e1874f3e16fb86ab86d7796b6c807b791b584e95
--- /dev/null
+++ b/.travis/linux-build.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+set -ex
+
+nproc=$(/usr/bin/getconf _NPROCESSORS_ONLN)
+
+function install_kernel()
+{
+ VER="$1"
+ URL="https://www.kernel.org/pub/linux/kernel/v4.x/linux-$VER.tar.xz"
+ wget "$URL"
+ tar xf "linux-$VER.tar.xz"
+
+ pushd "linux-$VER"
+ make allmodconfig
+ make -j $nproc modules_prepare
+ make -j $nproc headers_install
+ KERNEL_HEADERS=$(pwd)/usr/include
+ popd
+}
+
+function build_lksctp()
+{
+ ./bootstrap
+
+ #CFLAGS="-Werror"
+ if [ -n "$KERNEL_HEADERS" ]; then
+ CFLAGS="$CFLAGS -I$KERNEL_HEADERS"
+ fi
+ export CFLAGS
+ ./configure
+
+ make -j $nproc
+
+ #make -j $nproc distcheck
+}
+
+if [ -n "$KERNEL" ]; then
+ install_kernel "$KERNEL"
+fi
+
+build_lksctp
+
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/4] travis: build against multiple kernel versions
2018-07-28 22:31 [PATCH 1/4] travis: build against multiple kernel versions Marcelo Ricardo Leitner
@ 2018-07-30 11:50 ` Neil Horman
2018-07-30 16:01 ` Marcelo Ricardo Leitner
2018-07-30 21:10 ` Neil Horman
2 siblings, 0 replies; 4+ messages in thread
From: Neil Horman @ 2018-07-30 11:50 UTC (permalink / raw)
To: linux-sctp
On Sat, Jul 28, 2018 at 07:31:20PM -0300, Marcelo Ricardo Leitner wrote:
> With recent changes, configure is probing for kernel features before
> enabling them in the library.
>
> Now with this change, travis-ci will build the library against several
> different kernels, allowing a better CI.
>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
>
> The comments in linux-build.sh are intentional. Place holders for next
> steps.
>
> .travis.yml | 17 ++++++++++++-----
> .travis/linux-build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 55 insertions(+), 5 deletions(-)
> create mode 100755 .travis/linux-build.sh
>
> diff --git a/.travis.yml b/.travis.yml
> index 75d07aa0640d73d12321231ecce18aa407ce15f4..c0fb7c68c4977c7185cd05df1b88b6d552cfa59f 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -1,10 +1,17 @@
> language: c
> +addons:
> + apt:
> + packages:
> + - libelf-dev
> script:
> - - ./bootstrap
> - && ./configure
> - && make -j `/usr/bin/getconf _NPROCESSORS_ONLN`
> - # ipv6 is not supported by Travis
> - - make -C src/func_tests/ v4test
> + - ./.travis/linux-build.sh
> +env:
> + - KERNEL=4.10
> + - KERNEL=4.11
> + - KERNEL=4.12
> + - KERNEL=4.13
> + - KERNEL=4.16
> + - KERNEL=4.17
> compiler:
> - gcc
> - clang
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> new file mode 100755
> index 0000000000000000000000000000000000000000..e1874f3e16fb86ab86d7796b6c807b791b584e95
> --- /dev/null
> +++ b/.travis/linux-build.sh
> @@ -0,0 +1,43 @@
> +#!/bin/bash
> +
> +set -ex
Did you mean to keep this in here? I can understand the -e since this is for
travis ci testing, but -x seems like its just going to generate alot of noise.
Neil
> +
> +nproc=$(/usr/bin/getconf _NPROCESSORS_ONLN)
> +
> +function install_kernel()
> +{
> + VER="$1"
> + URL="https://www.kernel.org/pub/linux/kernel/v4.x/linux-$VER.tar.xz"
> + wget "$URL"
> + tar xf "linux-$VER.tar.xz"
> +
> + pushd "linux-$VER"
> + make allmodconfig
> + make -j $nproc modules_prepare
> + make -j $nproc headers_install
> + KERNEL_HEADERS=$(pwd)/usr/include
> + popd
> +}
> +
> +function build_lksctp()
> +{
> + ./bootstrap
> +
> + #CFLAGS="-Werror"
> + if [ -n "$KERNEL_HEADERS" ]; then
> + CFLAGS="$CFLAGS -I$KERNEL_HEADERS"
> + fi
> + export CFLAGS
> + ./configure
> +
> + make -j $nproc
> +
> + #make -j $nproc distcheck
> +}
> +
> +if [ -n "$KERNEL" ]; then
> + install_kernel "$KERNEL"
> +fi
> +
> +build_lksctp
> +
> --
> 2.17.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/4] travis: build against multiple kernel versions
2018-07-28 22:31 [PATCH 1/4] travis: build against multiple kernel versions Marcelo Ricardo Leitner
2018-07-30 11:50 ` Neil Horman
@ 2018-07-30 16:01 ` Marcelo Ricardo Leitner
2018-07-30 21:10 ` Neil Horman
2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Ricardo Leitner @ 2018-07-30 16:01 UTC (permalink / raw)
To: linux-sctp
On Mon, Jul 30, 2018 at 07:50:17AM -0400, Neil Horman wrote:
> On Sat, Jul 28, 2018 at 07:31:20PM -0300, Marcelo Ricardo Leitner wrote:
> > With recent changes, configure is probing for kernel features before
> > enabling them in the library.
> >
> > Now with this change, travis-ci will build the library against several
> > different kernels, allowing a better CI.
> >
> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > ---
> >
> > The comments in linux-build.sh are intentional. Place holders for next
> > steps.
> >
> > .travis.yml | 17 ++++++++++++-----
> > .travis/linux-build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 55 insertions(+), 5 deletions(-)
> > create mode 100755 .travis/linux-build.sh
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index 75d07aa0640d73d12321231ecce18aa407ce15f4..c0fb7c68c4977c7185cd05df1b88b6d552cfa59f 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -1,10 +1,17 @@
> > language: c
> > +addons:
> > + apt:
> > + packages:
> > + - libelf-dev
> > script:
> > - - ./bootstrap
> > - && ./configure
> > - && make -j `/usr/bin/getconf _NPROCESSORS_ONLN`
> > - # ipv6 is not supported by Travis
> > - - make -C src/func_tests/ v4test
> > + - ./.travis/linux-build.sh
> > +env:
> > + - KERNEL=4.10
> > + - KERNEL=4.11
> > + - KERNEL=4.12
> > + - KERNEL=4.13
> > + - KERNEL=4.16
> > + - KERNEL=4.17
> > compiler:
> > - gcc
> > - clang
> > diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> > new file mode 100755
> > index 0000000000000000000000000000000000000000..e1874f3e16fb86ab86d7796b6c807b791b584e95
> > --- /dev/null
> > +++ b/.travis/linux-build.sh
> > @@ -0,0 +1,43 @@
> > +#!/bin/bash
> > +
> > +set -ex
> Did you mean to keep this in here? I can understand the -e since this is for
Yes,
> travis ci testing, but -x seems like its just going to generate alot of noise.
but it's not much. There is no loop and it doesn't get propagated to
what the script is calling, so it prints pretty much the same number
of code lines, as debug lines.
As is it helps on identifying which command outputted what, instead of
adding specific echo commands.
Thx,
Marcelo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/4] travis: build against multiple kernel versions
2018-07-28 22:31 [PATCH 1/4] travis: build against multiple kernel versions Marcelo Ricardo Leitner
2018-07-30 11:50 ` Neil Horman
2018-07-30 16:01 ` Marcelo Ricardo Leitner
@ 2018-07-30 21:10 ` Neil Horman
2 siblings, 0 replies; 4+ messages in thread
From: Neil Horman @ 2018-07-30 21:10 UTC (permalink / raw)
To: linux-sctp
On Mon, Jul 30, 2018 at 01:01:42PM -0300, Marcelo Ricardo Leitner wrote:
> On Mon, Jul 30, 2018 at 07:50:17AM -0400, Neil Horman wrote:
> > On Sat, Jul 28, 2018 at 07:31:20PM -0300, Marcelo Ricardo Leitner wrote:
> > > With recent changes, configure is probing for kernel features before
> > > enabling them in the library.
> > >
> > > Now with this change, travis-ci will build the library against several
> > > different kernels, allowing a better CI.
> > >
> > > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > > ---
> > >
> > > The comments in linux-build.sh are intentional. Place holders for next
> > > steps.
> > >
> > > .travis.yml | 17 ++++++++++++-----
> > > .travis/linux-build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++
> > > 2 files changed, 55 insertions(+), 5 deletions(-)
> > > create mode 100755 .travis/linux-build.sh
> > >
> > > diff --git a/.travis.yml b/.travis.yml
> > > index 75d07aa0640d73d12321231ecce18aa407ce15f4..c0fb7c68c4977c7185cd05df1b88b6d552cfa59f 100644
> > > --- a/.travis.yml
> > > +++ b/.travis.yml
> > > @@ -1,10 +1,17 @@
> > > language: c
> > > +addons:
> > > + apt:
> > > + packages:
> > > + - libelf-dev
> > > script:
> > > - - ./bootstrap
> > > - && ./configure
> > > - && make -j `/usr/bin/getconf _NPROCESSORS_ONLN`
> > > - # ipv6 is not supported by Travis
> > > - - make -C src/func_tests/ v4test
> > > + - ./.travis/linux-build.sh
> > > +env:
> > > + - KERNEL=4.10
> > > + - KERNEL=4.11
> > > + - KERNEL=4.12
> > > + - KERNEL=4.13
> > > + - KERNEL=4.16
> > > + - KERNEL=4.17
> > > compiler:
> > > - gcc
> > > - clang
> > > diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> > > new file mode 100755
> > > index 0000000000000000000000000000000000000000..e1874f3e16fb86ab86d7796b6c807b791b584e95
> > > --- /dev/null
> > > +++ b/.travis/linux-build.sh
> > > @@ -0,0 +1,43 @@
> > > +#!/bin/bash
> > > +
> > > +set -ex
> > Did you mean to keep this in here? I can understand the -e since this is for
>
> Yes,
>
> > travis ci testing, but -x seems like its just going to generate alot of noise.
>
> but it's not much. There is no loop and it doesn't get propagated to
> what the script is calling, so it prints pretty much the same number
> of code lines, as debug lines.
>
> As is it helps on identifying which command outputted what, instead of
> adding specific echo commands.
>
> Thx,
> Marcelo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Ok, then for the series
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-30 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-28 22:31 [PATCH 1/4] travis: build against multiple kernel versions Marcelo Ricardo Leitner
2018-07-30 11:50 ` Neil Horman
2018-07-30 16:01 ` Marcelo Ricardo Leitner
2018-07-30 21:10 ` Neil Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.