From ae6e4f12fcabf4d234af5a1a05601ce1d1054c0c Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Tue, 5 Feb 2019 10:16:04 +0300 Subject: [PATCH] travis: Speed up linux kernel downloads. CDN links are much faster in average. https://www.kernel.org/ links shows usually less than 10 MB/s, while https://cdn.kernel.org/ could give up to 200 MB/s and usually shows speeds much higher than 10 MB/s. Also, 'xz' archives are 30-50 MB smaller than gzip ones. It takes a bit more time to unpack them, but it's negligible in compare with download time. For exmaple, linux-3.16.54.tar.gz - 122064395 (116M) linux-3.16.54.tar.xz - 81057528 (77M) 'xz' archive download via CDN link is the default way for kernel downloading that provided by the kernel.org. Some exmaples from Travis builds: Before: 100%[==========================>] 122,064,395 3.11MB/s in 36s (3.23 MB/s) - 'linux-3.16.54.tar.gz' saved [122064395/122064395] 100%[==========================>] 157,764,715 7.16MB/s in 24s (6.28 MB/s) - 'linux-4.17.14.tar.gz' saved [157764715/157764715] After: 100%[==========================>] 81,057,528 95.0MB/s in 0.8s (95.0 MB/s) - 'linux-3.16.54.tar.xz' saved [81057528/81057528] 100%[==========================>] 102,195,552 218MB/s in 0.4s (218 MB/s) - 'linux-4.17.14.tar.xz' saved [102195552/102195552] Signed-off-by: Ilya Maximets Signed-off-by: Ben Pfaff --- .travis/linux-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index 0a2091061..9d177aa1b 100755 --- a/.travis/linux-build.sh +++ b/.travis/linux-build.sh @@ -18,8 +18,8 @@ function install_kernel() PREFIX="v2.6/longterm/v2.6.32" fi - wget https://www.kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.gz - tar xzvf linux-${1}.tar.gz > /dev/null + wget https://cdn.kernel.org/pub/linux/kernel/${PREFIX}/linux-${1}.tar.xz + tar xvf linux-${1}.tar.xz > /dev/null cd linux-${1} make allmodconfig