From 762ee767f045148013420983847b93c8cebe717c Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 6 Jun 2018 15:10:37 +0000 Subject: [PATCH] travis: use kernel headers from v4.17 There is too much noise when using unreleased kernel uapi. * ci/install-dependencies.sh (clone_repo): Add optional "branch" argument, pass it to "git clone". ($KHEADERS): Pass $KBRANCH as branch argument of clone_repo. * .travis.yml (matrix): Specify KBRANCH=v4.17 for KHEADERS=torvalds/linux. --- .travis.yml | 1 + ci/install-dependencies.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index af823f99..3678eaf7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ matrix: - STACKTRACE=libunwind - CHECK=coverage - KHEADERS=torvalds/linux + - KBRANCH=v4.17 - compiler: gcc env: - TARGET=x86_64 diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 31b746ee..1c5d5c91 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -17,9 +17,10 @@ apt_get_install() git_installed= clone_repo() { - local src dst + local src dst branch src="$1"; shift dst="$1"; shift + branch="${1-}" [ -n "$git_installed" ] || { apt_get_install git ca-certificates @@ -35,12 +36,12 @@ clone_repo() ;; esac - git clone --depth=1 "$src" "$dst" + git clone --depth=1 ${branch:+--branch $branch} "$src" "$dst" } case "$KHEADERS" in */*) - clone_repo https://github.com/"$KHEADERS" kernel + clone_repo https://github.com/"$KHEADERS" kernel ${KBRANCH-} apt_get_install $common_packages $sudo make -C kernel headers_install INSTALL_HDR_PATH=/opt/kernel $sudo rm -rf kernel -- 2.40.0