File: .travis.yml

package info (click to toggle)
piglit 0~git20180515-62ef6b0db-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 102,084 kB
  • sloc: ansic: 244,201; xml: 47,485; python: 28,308; lisp: 19,320; cpp: 10,678; sh: 301; makefile: 33; pascal: 5
file content (59 lines) | stat: -rw-r--r-- 1,526 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
sudo: false
os: linux
language: python
cache:
  - ccache
  - pip
services:
  - docker

env:
  global:
    - BUILD=pytest

matrix:
  include:
    - python: 2.7
      env: TOX_ENV="py27-{generator,noaccel,accel-nix,streams}"
    - python: 3.3
      env: TOX_ENV="py33-{generator,noaccel,accel-nix,streams}"
    - python: 3.4
      env: TOX_ENV="py34-{generator,noaccel,accel-nix,streams}"
    - python: 3.5
      env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}"
    - python: 3.6
      env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}"
    - env: BUILD=cmake

install:
  - |
    if [[ $BUILD == pytest ]]; then
      pip install tox
    else
      wget https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz
      tar xvf rocker-1.3.1-linux_amd64.tar.gz
      rm rocker-1.3.1-linux_amd64.tar.gz
    fi

before_script:
  - |
    if [[ $BUILD != pytest ]]; then
      mkdir -p -m777 ~/.ccache
    fi

script:
  - |
    if [[ $BUILD == pytest ]]; then
      tox -e $TOX_ENV
    else
      ./rocker build -f docker/Rockerfile.piglit ${DOCKER_TAG:+--var TAG=}${DOCKER_TAG} ${DOCKER_IMAGE:+--var IMAGE=}${DOCKER_IMAGE} ${DOCKER_PARENT:+--var PARENT=}${DOCKER_PARENT} .
    fi

after_success:
  - |
    if [[ $BUILD != pytest ]]; then
      if [[ -n $DOCKER_IMAGE && -n $DOCKER_TAG && -n $DOCKER_USERNAME && $TRAVIS_BRANCH == master ]]; then
        docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"
        docker push "${DOCKER_IMAGE}":"${DOCKER_TAG}"
      fi
    fi