f91ea8b5bce91f14d7cbc14e636bd5af394b0506
- Author
- Michael Aquilina <michaelaquilina@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Merge pull request #36 from MichaelAquilina/ccache
Use ccache to improve build times
Diff
1diff --git a/.travis.yml b/.travis.yml
2index f0dab024796d350f76947928b795416346bed6dd..7253c44a7b9622178d8b24d237b6f7a4c244c019 100644
3--- a/.travis.yml
4+++ b/.travis.yml
5@@ -1,35 +1,33 @@
6-dist: trusty
7-sudo: required
8-
9+sudo: false
10 language: python
11 python:
12 - "3.6"
13
14 env:
15- - ZSH_VERSION=5.4.2 URL="https://downloads.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.xz"
16- - ZSH_VERSION=5.3.1 URL="https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.xz"
17- - ZSH_VERSION=5.2 URL="https://downloads.sourceforge.net/project/zsh/zsh/5.2/zsh-5.2.tar.xz"
18- - ZSH_VERSION=5.1.1 URL="https://downloads.sourceforge.net/project/zsh/zsh/5.1.1/zsh-5.1.1.tar.xz"
19- - ZSH_VERSION=5.0.8 URL="https://downloads.sourceforge.net/project/zsh/zsh/5.0.8/zsh-5.0.8.tar.gz"
20-
21-addons:
22- apt:
23- packages:
24- - build-essential
25+ - ZSH_TARGET="5.4.2"
26+ - ZSH_TARGET="5.3.1"
27+ - ZSH_TARGET="5.2"
28+ - ZSH_TARGET="5.1.1"
29
30 before_install:
31+ # Setup ccache to run instead of gcc
32+ - export PATH="/usr/lib/ccache:$PATH"
33+ - which gcc
34+ # Download zsh
35 - export LOCAL="$(mktemp --directory --tmpdir=${TMPDIR:/tmp} local.bin.XXXXXX)"
36- - wget $URL
37- - tar -xf "zsh-$ZSH_VERSION.tar."*
38- - cd "zsh-$ZSH_VERSION"
39+ - wget "https://downloads.sourceforge.net/project/zsh/zsh/$ZSH_TARGET/zsh-$ZSH_TARGET.tar.xz"
40+
41+install:
42+ - pip install virtualenvwrapper restructuredtext_lint
43+ # Build and Install zsh
44+ - tar -xf "zsh-$ZSH_TARGET.tar.xz"*
45+ - cd "zsh-$ZSH_TARGET"
46 - ./configure --prefix="$LOCAL"
47 - make
48 - make install
49 - cd -
50 - export PATH="$LOCAL/bin:$PATH"
51
52-install:
53- - pip install virtualenvwrapper restructuredtext_lint
54
55 before_script:
56 - mkdir -p ~/bin
57@@ -40,3 +38,8 @@ before_script:
58 script:
59 - rst-lint *.rst
60 - zunit --verbose
61+
62+cache:
63+ directories:
64+ - "$HOME/.cache/pip"
65+ - "$HOME/.ccache"