-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
118 lines (104 loc) · 3.39 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
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 2
variables:
repoDir: '$(Build.Repository.LocalPath)'
steps:
- task: CondaEnvironment@1
inputs:
updateConda: false
- script: |
chmod +x tests/test_project.sh || exit 1
./tests/test_project.sh $(repoDir) source || exit 1
- job: macOS
pool:
vmImage: 'xcode9-macos10.13'
strategy:
maxParallel: 2
variables:
repoDir: '$(Build.Repository.LocalPath)'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- script: |
chmod +x tests/test_project.sh || exit 1
./tests/test_project.sh $(repoDir) source || exit 1
- job:
displayName: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
maxParallel: 2
# matrix:
# py36:
# PY_VERSION: 3.6
# VS_VERSION: 2015
# # py27:
# # PY_VERSION: 2.7
variables:
repoDir: '$(Build.Repository.LocalPath)'
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name myroot|| exit 1
displayName: Create Anaconda environment
- script: |
call activate myroot || exit 1
conda install --yes --quiet --name myroot cookiecutter -c conda-forge || exit 1
displayName: Install Anaconda packages
- script: |
echo "activate" || exit 1
call activate myroot || exit 1
echo "cd" || exit 1
cd .. || exit 1
echo "run cookiecutter" || exit 1
cookiecutter %repoDir% --overwrite-if-exists --no-input || exit 1
displayName: generating project from cookiecutter
- script: |
echo "activate" || exit 1
call activate myroot || exit 1
echo "cd path" || exit 1
cd .. || exit 1
cd cpptools || exit 1
echo "create" || exit 1
conda env create -f cpptools-dev-requirements.yml || exit 1
echo "done" || exit 1
displayName: create dev requirements env
- script: |
echo "cd path" || exit 1
cd ..\cpptools || exit 1
echo "activate" || exit 1
call activate cpptools-dev-requirements || exit 1
echo "mkdir" || exit 1
mkdir build || exit 1
cd build || exit 1
echo "cmake gen" || exit 1
cmake .. -G"Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release ^
-DDEPENDENCY_SEARCH_PREFIX="%CONDA_PREFIX%\Library" -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" || exit 1
displayName: configure project
- script: |
echo "cd path" || exit 1
cd ..\cpptools\build || exit 1
echo "activate" || exit 1
call activate cpptools-dev-requirements || exit 1
cmake --build . --target ALL_BUILD || exit 1
displayName: build project
- script: |
echo "cd path" || exit 1
cd ..\cpptools\build || exit 1
echo "activate" || exit 1
call activate cpptools-dev-requirements || exit 1
echo "run tests" || exit 1
cmake --build . --target python-test || exit 1
cmake --build . --target cpp-test || exit 1
displayName: run tests
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true