Skip to content

Commit e0abf63

Browse files
authored
👷 Travis: Add caching for tmux builds and pip, add tmux 2.9 + 3.0a (#527)
2 parents 9cb7e59 + c667ab3 commit e0abf63

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.travis.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
language: python
22
sudo: false
3+
dist: bionic # 18.04
34
python:
45
- 2.7
56
- 3.6
67
- 3.7
7-
- pypy
88
- pypy3
99
if: (type = push AND branch IN (master)) OR (type = pull_request)
1010
env:
1111
global:
1212
- RETRY_TIMEOUT_SECONDS=15
1313
matrix:
1414
- TMUX_VERSION=master
15+
- TMUX_VERSION=3.0a
16+
- TMUX_VERSION=2.9
17+
- TMUX_VERSION=2.8
1518
- TMUX_VERSION=2.8
1619
- TMUX_VERSION=2.7
1720
- TMUX_VERSION=2.6
@@ -26,7 +29,11 @@ env:
2629
matrix:
2730
allow_failures:
2831
- env: TMUX_VERSION=master
29-
32+
cache:
33+
- pip
34+
- directories:
35+
- ~/source
36+
- ~/build
3037
before_install:
3138
- export PIP_USE_MIRRORS=true
3239
- pip install --upgrade pytest # https://github.com/travis-ci/travis-ci/issues/4873
@@ -36,13 +43,15 @@ install:
3643
- pip install -e .
3744
- pip install -r requirements/test.txt
3845
before_script:
39-
- git clone https://github.com/tmux/tmux.git tmux
40-
- cd tmux
46+
- mkdir -p ~/source
47+
- mkdir -p ~/build/tmux-$TMUX_VERSION
48+
- if [[ ! -d ~/source/tmux-$TMUX_VERSION ]]; then git clone https://github.com/tmux/tmux.git ~/source/tmux-$TMUX_VERSION; fi
49+
- cd ~/source/tmux-$TMUX_VERSION
4150
- git checkout $TMUX_VERSION
42-
- sh autogen.sh
43-
- ./configure --prefix=$HOME/tmux && make && make install
44-
- export PATH=$HOME/tmux/bin:$PATH
45-
- cd ..
51+
- export PATH=$HOME/build/tmux-$TMUX_VERSION/bin:$PATH
52+
- if [[ $TMUX_VERSION == "master" || ! $(tmux -V | grep $TMUX_VERSION) ]]; then sh autogen.sh; fi
53+
- if [[ $TMUX_VERSION == "master" || ! $(tmux -V | grep $TMUX_VERSION) ]]; then ./configure --prefix=$HOME/build/tmux-$TMUX_VERSION && make && make install; fi
54+
- cd $TRAVIS_BUILD_DIR
4655
- tmux -V
4756
script:
4857
- py.test --cov

0 commit comments

Comments
 (0)