forked from caproto/caproto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
130 lines (111 loc) · 3.82 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# vi: sw=2 ts=2 sts=2 expandtab
jobs:
- job: 'Test'
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
Python36_R314:
python.version: '3.6'
epics.on.travis.pkg: '0.8.2/epics-ci-0.8.2_R3.14.12.6_pva_areadetector3-2_motor6-9.tar.bz2'
Python37_R314:
python.version: '3.7'
epics.on.travis.pkg: '0.8.2/epics-ci-0.8.2_R3.14.12.6_pva_areadetector3-2_motor6-9.tar.bz2'
Python36_R7:
python.version: '3.6'
epics.on.travis.pkg: '0.8.2/epics-ci-0.8.2_R7.0.1.1_pva_areadetector3-2_motor6-10.tar.bz2'
Python37_R7:
python.version: '3.7'
epics.on.travis.pkg: '0.8.2/epics-ci-0.8.2_R7.0.1.1_pva_areadetector3-2_motor6-10.tar.bz2'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- bash: |
git submodule update --init --recursive
displayName: 'Checkout submodules'
- bash: |
pushd /home
sudo ln -sf $USER travis
ls -la /home
popd
displayName: 'Pretend azure is travis'
- bash: |
/sbin/ifconfig
ip addr
env
pwd
cp azure_env.sh $HOME
displayName: 'Configure the environment'
- bash: |
export CI_TOP="${BUILD_REPOSITORY_LOCALPATH}/.ci"
export EPICS_ON_TRAVIS_PKG="$(epics.on.travis.pkg)"
source $HOME/azure_env.sh
bash ${CI_TOP}/install-from-release.sh "${EPICS_ON_TRAVIS_URL}"
displayName: 'Install EPICS dependencies'
- bash: |
echo "EPICS versions are as follows:"
source $HOME/azure_env.sh
echo "Base version: ${BASE_VER}"
cat $HOME/epics/versions.sh
displayName: 'Show EPICS versions'
- bash: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
pip install git+https://github.com/klauer/catvs.git@py3k
pip install pyepics numpy
pip install --quiet --upgrade cython
displayName: 'Install Python dependencies'
- bash: |
pip install .
displayName: 'Install caproto'
- bash: |
source $HOME/azure_env.sh
python -c "from caproto.tests.conftest import run_example_ioc; run_example_ioc('caproto.ioc_examples.simple', request=None, args=['--prefix', 'azure_test:', '--async-lib', 'trio'], pv_to_check='azure_test:A')"
sleep 2
caproto-get -vvv azure_test:A
caget azure_test:pi
sleep 2
killall python
displayName: 'simple caproto IOC test'
- bash: |
source $HOME/azure_env.sh
echo "EPICS bin contents:"
ls ${EPICS_BIN_PATH}
echo "Starting IOCs..."
cp -f ${AREA_DETECTOR_PATH}/ADCore/iocBoot/EXAMPLE_commonPlugins.cmd ${AREA_DETECTOR_PATH}/ADCore/iocBoot/commonPlugins.cmd
echo "Patching epics-config.sh to increase EPICS_CA_MAX_ARRAY_BYTES"
sed -i -e "s/EPICS_CA_MAX_ARRAY_BYTES=10000000/EPICS_CA_MAX_ARRAY_BYTES=20000000/" ${CI_SCRIPTS}/epics-config.sh
bash ${CI_SCRIPTS}/run-epics-iocs-on-tmux.sh
displayName: 'Run IOCs on tmux'
- bash: |
source $HOME/azure_env.sh
coverage run --parallel-mode run_tests.py -k 'not bench' --benchmark-disable --timeout=100 -v --junitxml=junit/test-results.xml
displayName: 'pytest'
- bash: |
coverage combine --append
coverage report -m
displayName: 'Report coverage'
- bash: |
source $HOME/azure_env.sh
if [ -f junit/test-results.xml ]; then
python caproto/tests/view_leaks.py junit/test-results.xml
fi
displayName: 'Debug leaks'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
- job: 'Publish'
dependsOn: 'Test'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- script: python setup.py sdist
displayName: 'Build sdist'