forked from metabrainz/picard
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
114 lines (107 loc) · 3.36 KB
/
.travis.yml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
os: linux
dist: xenial
language: python
python:
- '3.7'
- '3.6'
- '3.5'
addons:
apt:
packages:
- libdiscid0
- libdiscid-dev
- qt5-default
cache:
apt: true
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
env:
global:
- PIP_INSTALL="pip3 install"
- INSTALL_DEPS="$PIP_INSTALL -r requirements.txt"
- INSTALL_TEST_TOOLS="$PIP_INSTALL pytest pytest-randomly pytest-cov isort==4.3.10 flake8"
- CODACY="$PIP_INSTALL codacy-coverage"
- LIBDISCID="libdiscid0 libdiscid-dev"
matrix:
- INSTALL_DEPS="$PIP_INSTALL -r requirements.txt"
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.12.3 mutagen discid"
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.11.3 mutagen discid"
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.10 mutagen discid"
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.9 mutagen discid"
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.8 mutagen==1.37 discid sip==4.19.8"
matrix:
include:
- os: osx
osx_image: xcode9
language: generic
env:
- DISCID_VERSION=0.6.2
- FPCALC_VERSION=1.4.3
- PYTHON_VERSION=3.7.4
- INSTALL_DEPS="$PIP_INSTALL -r requirements-macos.txt"
- os: osx
osx_image: xcode9.4
language: generic
env:
- DISCID_VERSION=0.6.2
- FPCALC_VERSION=1.4.3
- PYTHON_VERSION=3.7.4
- INSTALL_DEPS="$PIP_INSTALL -r requirements-macos.txt"
- os: osx
osx_image: xcode11
language: generic
env:
- DISCID_VERSION=0.6.2
- FPCALC_VERSION=1.4.3
- PYTHON_VERSION=3.7.4
- INSTALL_DEPS="$PIP_INSTALL -r requirements-macos.txt"
- os: linux
before_install: skip
install: skip
script:
- pip3 install .
fast_finish: true
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
# Credit https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/9
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash scripts/setup-osx.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source bin/activate; fi
- "$INSTALL_DEPS"
- "$INSTALL_TEST_TOOLS"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash scripts/package-osx.sh; fi
script:
- py.test -v --cov=picard --cov-report xml:coverage.xml test
- isort --check-only --diff --quiet $(git ls-tree -r --name-only $(git rev-parse HEAD) | grep "\\.py$")
- flake8 picard
after_success:
- if [ ! -z "${CODACY_PROJECT_TOKEN}" ]; then $CODACY; python-codacy-coverage -r coverage.xml;
fi
notifications:
irc:
channels:
- "ircs://chat.freenode.net:6697/#metabrainz"
template:
- "[%{repository_name}:%{branch}@%{commit} - build #%{build_number}] CI %{result}! (%{build_url})"
on_success: change
on_failure: always
branches:
only:
- master
- /\d\.[0-9x](\.[0-9x])?/
deploy:
provider: releases
api_key:
secure: JgtlHc3OkQ+VzfpV7QGSIo/uJQdXSYgssi/f6rfwTYEy3nkLNRys7EQAYa8VExeK+QytiTuW6/2/hIUgFbjYywpkIBv+JiVrDStBOB8jI8QPcWx1fYWKnZOSITbvLXbKWNk4zMe8ccNIeP0+wRkZwio6FqrADbgg1On6n7setzU=
file_glob: true
skip_cleanup: true
file: dist/*.dmg
on:
tags: true
all_branches: true
condition: $TRAVIS_OSX_IMAGE = xcode9