summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 534bd1ed1ec0f9b8ccdc345d3579ae4ab152b47d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
language: c
cache: ccache
branches:
  except:
    - travis

matrix:
 include:
   - os: linux
     dist: trusty
     services: docker

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull vathpela/shim-travis-rawhide:v2 ; fi

before_script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM vathpela/shim-travis-rawhide:v2 > Dockerfile ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --volume $HOME/.ccache:/root/.ccache withgit /bin/sh -c "cd /root/shim && git pull && git reset origin/master --hard && ./travis-build.sh --branch $TRAVIS_BRANCH --repo \"$TRAVIS_REPO_SLUG\" --remote \"$TRAVIS_PULL_REQUEST_SLUG\" --pr-sha \"$TRAVIS_PULL_REQUEST_SHA\"" ; fi
  - ccache -s