forked from LABSN/expyfun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
112 lines (109 loc) · 4 KB
/
azure-pipelines.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
trigger:
# start a new build for every push
batch: False
branches:
include:
- main
stages:
- stage: Check
jobs:
- job: Skip
pool:
vmImage: 'ubuntu-18.04'
variables:
DECODE_PERCENTS: 'false'
RET: 'true'
steps:
- bash: |
git_log=`git log --max-count=1 --skip=1 --pretty=format:"%s"`
echo "##vso[task.setvariable variable=log]$git_log"
- bash: echo "##vso[task.setvariable variable=RET]false"
condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))
- bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET"
name: result
- stage: Main
condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))
dependsOn: Check
variables:
AZURE_CI: 'true'
jobs:
- job: Windows
pool:
vmIMage: 'VS2017-Win2016'
variables:
MNE_LOGGING_LEVEL: 'warning'
MNE_FORCE_SERIAL: 'true'
PIP_DEPENDENCIES: 'codecov'
OPENBLAS_NUM_THREADS: 1
AZURE_CI_WINDOWS: 'true'
strategy:
maxParallel: 4
matrix:
Python37:
PYTHON_VERSION: '3.7'
Python39:
PYTHON_VERSION: '3.9'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
architecture: 'x64'
addToPath: true
- script: echo "##vso[task.prependpath]C:\Users\VssAdministrator\AppData\Roaming\Python\Python39\site-packages\pywin32_system32;"
displayName: Add local bin to PATH
condition: in(variables['PYTHON_VERSION'], '3.9')
- bash: |
set -e
pip install --user --upgrade pip setuptools wheel
pip install --user --upgrade numpy scipy matplotlib
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
# Until https://github.com/pyglet/pyglet/pull/516 is reverted or fixed, we need to use an older one
pip install --user --upgrade https://github.com/pyglet/pyglet/zipball/pyglet-1.5-maintenance
else
pip install --user --upgrade "pyglet!=1.5.16"
fi
pip install --user -q coverage setuptools h5py pandas pytest pytest-cov pytest-timeout codecov pyglet-ffmpeg mne tdtpy joblib numpydoc pillow
python -c "import mne; mne.sys_info()"
python -c "import matplotlib.pyplot as plt"
python -c "import pyglet; print(pyglet.version)"
python -c "import tdt; print(tdt.__version__)"
displayName: 'Install pip dependencies'
- bash: |
set -e
git clone --depth 1 git://github.com/LABSN/sound-ci-helpers.git
powershell sound-ci-helpers/windows/setup_sound.ps1
pip install -q --user rtmixer
python -m sounddevice
displayName: 'Install rtmixer'
- bash: |
set -e
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
python -c "import pyglet; r = pyglet.gl.gl_info.get_renderer(); print(r); assert 'gallium' in r.lower()"
displayName: 'Get OpenGL'
- powershell: |
powershell make/get_video.ps1
displayName: 'Get video support'
- powershell: |
python -c "from ctypes import cdll; print(cdll.LoadLibrary('avcodec-58'))"
displayName: 'Check avcodec'
- powershell: |
python -c "import expyfun; expyfun._utils._has_video(raise_error=True)"
displayName: 'Check video support'
- bash: |
python setup.py develop
displayName: 'Install'
- bash: |
pytest --tb=short --cov=expyfun expyfun
displayName: 'Run tests'
- bash: |
codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN%
displayName: 'Codecov'
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
condition: always()
- task: PublishTestResults@2
inputs:
testResultsFiles: 'junit-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
condition: always()