Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Update CI configuration (#1923)
Browse files Browse the repository at this point in the history
* CI: Remove deprecated `sudo` option in .travis.yml

Ref:
https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>

* CI: Replace manual git install with official apt addon

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>

* CI: enable ccache to speed up build process

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>

* Unify git to use https for submodules on git.apache.org

Only https://git.apache.org/serf.git uses https seems not cool

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>

* CI: reduce git clone depth to speed up

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>

* CI: Cache git submodule to speed up

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
  • Loading branch information
PeterDaveHello authored and oschaaf committed Jul 14, 2019
1 parent 8a3ac4b commit 885f465
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .gitmodules
@@ -1,10 +1,10 @@
# The two httpds are the longest syncs, so we'd like to start them first.
[submodule "third_party/httpd/src"]
path = third_party/httpd/src
url = git://git.apache.org/httpd.git
url = https://git.apache.org/httpd.git
[submodule "third_party/httpd24/src"]
path = third_party/httpd24/src
url = git://git.apache.org/httpd.git
url = https://git.apache.org/httpd.git
[submodule "third_party/brotli/src"]
path = third_party/brotli/src
url = https://github.com/google/brotli.git
Expand All @@ -13,7 +13,7 @@
url = https://github.com/google/closure-library.git
[submodule "third_party/aprutil/src"]
path = third_party/aprutil/src
url = git://git.apache.org/apr-util.git
url = https://git.apache.org/apr-util.git
[submodule "third_party/re2/src"]
path = third_party/re2/src
url = https://github.com/google/re2.git
Expand All @@ -39,7 +39,7 @@
url = https://github.com/redis/hiredis.git
[submodule "third_party/apr/src"]
path = third_party/apr/src
url = git://git.apache.org/apr.git
url = https://git.apache.org/apr.git
[submodule "third_party/optipng"]
path = third_party/optipng
url = https://github.com/apache/incubator-pagespeed-optipng.git
Expand Down
22 changes: 16 additions & 6 deletions .travis.yml
@@ -1,5 +1,4 @@
language: c++
sudo: required
compiler:
- gcc

Expand All @@ -8,20 +7,31 @@ git:
# speed it up. Here we prevent travis from using git clone --recursive, so
# below in before_install we can manually update including --jobs.
submodules: false
depth: 10

before_install:
cache:
ccache: true
directories:
- .git/modules/

addons:
# Unfortunately, the version of git we get by default is too low to support
# --jobs on subdmodule, so update git before pulling in the submodules.
- sudo add-apt-repository -y ppa:git-core/ppa
- sudo apt-get update -q
- sudo apt-get install -q -y git
apt:
sources:
- git-core
packages:
- git

before_install:
# git.apache.org is the canonical repo but throttles network connections.
# using github.com seems to reduce network errors a lot.
- git config --global url.https://github.com/apache/.insteadOf git://git.apache.org/
- git config --global url.https://github.com/apache/.insteadOf https://git.apache.org/
- git submodule update --init --recursive --jobs=2
env:
global:
- MAKEFLAGS=-j3
- PATH="/usr/lib/ccache/:$PATH"
matrix:
- BIT_FLAG=
# This would do another build for 32-bit, but we're already borderline
Expand Down

0 comments on commit 885f465

Please sign in to comment.