2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

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 <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ilya Maximets
2019-02-05 10:16:04 +03:00
committed by Ben Pfaff
parent 731dbbbe04
commit ae6e4f12fc

View File

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