All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH lksctp-tools] travis: use git instead of downloading tarballs
Date: Thu, 02 Aug 2018 11:39:56 +0000	[thread overview]
Message-ID: <20180802113956.GC28190@hmswarspite.think-freely.org> (raw)
In-Reply-To: <61414c1f14e60615bd2c2235dca6797baa1c0783.1533141162.git.marcelo.leitner@gmail.com>

On Wed, Aug 01, 2018 at 01:33:05PM -0300, Marcelo Ricardo Leitner wrote:
> With this, we 1) avoid downloading several tarballs and 2) make it
> easier to test against Linus master.
> 
> We want to test against Linus master so can catch build errors before
> GA, like the one fixed by Xin's patches in the sequence.
> 
> Sample build: https://travis-ci.org/sctp/lksctp-tools/builds/410860154
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
>  .travis.yml            |  7 +----
>  .travis/linux-build.sh | 61 +++++++++++++++++++++++++++++++++++-------
>  2 files changed, 53 insertions(+), 15 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 8416b621a6f486469cef8fbb61e3d782674a4978..f1b2b49b97485f870047c7865d18605175b35c53 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -9,12 +9,7 @@ env:
>    global:
>      - KERNEL=4.17
>    matrix:
> -    - KERNEL=4.10
> -    - KERNEL=4.11
> -    - KERNEL=4.12
> -    - KERNEL=4.13
> -    - KERNEL=4.16
> -    - KERNEL=4.17
> +    - KERNEL=""
>  compiler:
>    - gcc
>    - clang
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index e1874f3e16fb86ab86d7796b6c807b791b584e95..746f17252992f8f80a49fd9004bc9600cc97081e 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -1,17 +1,34 @@
> -#!/bin/bash
> +#!/bin/bash -ex
>  
> -set -ex
> +VERS="master v4.17 v4.16 v4.13 v4.12 v4.11 v4.10"
>  
>  nproc=$(/usr/bin/getconf _NPROCESSORS_ONLN)
> +basedir=$(pwd)
>  
> -function install_kernel()
> +function cleanup()
> +{
> +	cd "$basedir"
> +	[ ! -d linux ] || rm -rf linux
> +	[ ! -d "linux-$KERNEL" ] || rm -rf "linux-$KERNEL"
> +	make distclean || :
> +}
> +
> +function clone_kernel()
> +{
> +	git clone https://github.com/torvalds/linux
> +}
> +
> +function download_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"
> +function __prep_kernel()
> +{
> +	make mrproper
>  	make allmodconfig
>  	make -j $nproc modules_prepare
>  	make -j $nproc headers_install
> @@ -19,8 +36,26 @@ function install_kernel()
>  	popd
>  }
>  
> +function git_prep_kernel()
> +{
> +	VER="$1"
> +
> +	pushd "linux"
> +	git checkout "$VER"
> +	__prep_kernel
> +}
> +
> +function download_prep_kernel()
> +{
> +	VER="$1"
> +
> +	pushd "linux-$VER"
> +	__prep_kernel
> +}
> +
>  function build_lksctp()
>  {
> +	make distclean || :
>  	./bootstrap
>  
>  	#CFLAGS="-Werror"
> @@ -33,11 +68,19 @@ function build_lksctp()
>  	make -j $nproc
>  
>  	#make -j $nproc distcheck
> -}
>  
> -if [ -n "$KERNEL" ]; then
> -	install_kernel "$KERNEL"
> -fi
> +}
>  
> -build_lksctp
> +trap cleanup EXIT
> +if [ -z "$KERNEL" ]; then
> +	clone_kernel
>  
> +	for ver in $VERS; do
> +		git_prep_kernel "$ver"
> +		build_lksctp
> +	done
> +else
> +	download_kernel "$KERNEL"
> +	download_prep_kernel "$KERNEL"
> +	build_lksctp
> +fi
> -- 
> 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
Acked-by: Neil Horman <nhorman@tuxdriver.com>> 

  parent reply	other threads:[~2018-08-02 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 16:33 [PATCH lksctp-tools] travis: use git instead of downloading tarballs Marcelo Ricardo Leitner
2018-08-01 17:43 ` Marcelo Ricardo Leitner
2018-08-02 11:39 ` Neil Horman [this message]
2018-08-10 18:29 ` Marcelo Ricardo Leitner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180802113956.GC28190@hmswarspite.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.