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.
This commit is contained in:
Дмитрий Левин 2018-06-06 15:10:37 +00:00
parent 4f652c1ec4
commit 762ee767f0
2 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,7 @@ matrix:
- STACKTRACE=libunwind
- CHECK=coverage
- KHEADERS=torvalds/linux
- KBRANCH=v4.17
- compiler: gcc
env:
- TARGET=x86_64

View File

@ -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