File: .travis.yml

package info (click to toggle)
psychopy 2020.2.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 44,056 kB
  • sloc: python: 119,649; javascript: 3,022; makefile: 148; sh: 125; xml: 9
file content (100 lines) | stat: -rw-r--r-- 3,402 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# vim ft=yaml
# travis-ci.org and coveralls definition for PsychoPy tests
dist: trusty  # trusty is giving an error on bitsShaders test (glReadpixels()?)
sudo: true

language: python

matrix:
  include:

    - os: linux
      env: CONDA=true PYTHON_VERSION=3.6 DISPLAY=:99.0

    - os: linux
      env: CONDA=true PYTHON_VERSION=3.7 DISPLAY=:99.0

    - os: linux
      env: CONDA=true PYTHON_VERSION=3.8 DISPLAY=:99.0

    - os: linux
      env: CONDA=true PYTHON_VERSION=3.6 PYGLET=1.3 DISPLAY=:99.0

#  allow_failures:
#    - env: CONDA=true PYTHON_VERSION=2.7 WXPYTHON=4 OPENPYXL=2.4 DISPLAY=:99.0

before_install:
  - pwd
  - ./travis/00_set_up_packaging_system.sh
  - ./travis/10_install_system_dependencies.sh

  # Install & activate conda environment, if requested; otherwise,
  # install system Python dependencies.
  - |
    if [ -n "$CONDA" ]; then
      ./travis/20_install_miniconda_python.sh
      source ~/miniconda/etc/profile.d/conda.sh # Initialize shell.
      conda activate psychopy-conda
    else
      ./travis/20_install_system_python.sh
    fi

  - echo $PATH
  - which python
  - python --version
  - python -c 'import pyglet; print(pyglet.version)'
  - python -c 'import matplotlib; print(matplotlib.__version__)'
  - python -c 'import PIL; print(PIL.__version__)'
  - python -c 'import wx; print(wx.__version__)'
  - python -c 'import openpyxl; print(openpyxl.__version__)'
  - python -c 'import tables; print(tables.__version__)'

install:
  - python setup.py build

  # Build & install sdist.
  - python setup.py sdist
  - pip install --no-deps dist/PsychoPy-*.tar.gz
  - pip uninstall --yes psychopy

  # Build & install wheel.
  - python setup.py bdist_wheel
  - pip install --no-deps dist/PsychoPy-*.whl

  # Test entry point.
  - psychopy --version

  - pip uninstall --yes psychopy
  - rm -rf build/ dist/

before_script:
  - |
    if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
       /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +extension RANDR +render -noreset
    fi

  # To enable core.rush() functionality, we need to set capabilities on the Python
  # executable. However, setcap'd binaries ignore LD_LIBRARY_PATH; this will
  # break conda Python. The solution is to add the conda libraries to the "global"
  # library search paths in /etc/ld.so.conf.d, and update the caches by calling
  # ldconfig. Then, the capabilities can be set using setcap. Note that `python`
  # in a conda env is merely a symlink to the actual binary; therefore, setcap
  # will refuse work on it. Solution is to find find the "real"
  # path to the Python binary by resolving the symlink via `os.path.realpath()`.
  - echo $HOME/miniconda/envs/psychopy-conda/lib | sudo tee /etc/ld.so.conf.d/psychopy-conda-lib.conf
  - sudo ldconfig
  - export PYTHON_EXECUTABLE=`python -c "import os; import sys; print(os.path.realpath(sys.executable))"`
  - sudo setcap cap_sys_nice+ep ${PYTHON_EXECUTABLE}
  - getcap ${PYTHON_EXECUTABLE}

script:
  - |
    if [ "${PYTHON_VERSION}" == "3.8" ]; then
      pytest --cov-config .travis_coveragerc --cov=psychopy -v -s -m "not needs_sound and not needs_pygame" psychopy
    else
      pytest --cov-config .travis_coveragerc --cov=psychopy -v -s -m "not needs_sound" psychopy
    fi

after_success:
  - coveralls
  - codecov