This repository has been archived by the owner on Feb 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathazure-pipelines.yml
145 lines (112 loc) · 3.51 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
jobs:
- job: linux64
displayName: 'Ubuntu 16.04'
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: conda create --yes --quiet --name myEnvironment
displayName: Create Anaconda environment
- bash: |
source activate myEnvironment
conda install --yes --quiet --name myEnvironment -c conda-forge python=3.7 fmpy pytest scipy
displayName: Install Anaconda packages
- bash: |
source activate myEnvironment
pytest --junitxml=junit/test-results.xml
displayName: Build and run tests
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results'
- task: PublishPipelineArtifact@1
inputs:
path: fmus
artifact: linux64
- job: darwin64
displayName: 'macOS 10.13'
pool:
vmImage: 'macos-10.13'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
# We need to take ownership if we want to update conda or install packages globally
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- bash: conda create --yes --quiet --name myEnvironment
displayName: Create Anaconda environment
- bash: |
source activate myEnvironment
conda install --yes --quiet --name myEnvironment -c conda-forge python=3.7 fmpy pytest scipy
displayName: Install Anaconda packages
- bash: |
source activate myEnvironment
pytest --junitxml=junit/test-results.xml
displayName: Build and run tests
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results'
- task: PublishPipelineArtifact@1
inputs:
path: fmus
artifact: darwin64
- job: win64
displayName: 'Windows 2016'
pool:
vmImage: 'vs2017-win2016'
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name myEnvironment
displayName: Create Anaconda environment
- script: |
call activate myEnvironment
conda install --yes --quiet --name myEnvironment -c conda-forge python=3.7 cmake fmpy pytest scipy
displayName: Install Anaconda packages
- script: |
call activate myEnvironment
pytest --junitxml=junit/test-results.xml
displayName: Build, install and run tests
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results'
- task: PublishPipelineArtifact@1
inputs:
path: fmus
artifact: win64
- job: merge
dependsOn:
- linux64
- darwin64
- win64
displayName: 'Merge platform binaries'
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: mkdir fmus
displayName: Create fmus directory
- task: DownloadPipelineArtifact@2
inputs:
artifact: linux64
downloadPath: fmus
- task: DownloadPipelineArtifact@2
inputs:
artifact: darwin64
downloadPath: fmus
- task: DownloadPipelineArtifact@2
inputs:
artifact: win64
downloadPath: fmus
- bash: python3 merge_platform_binaries.py
displayName: Merge FMUs
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: merged_fmus.zip
artifactName: merged_fmus