forked from eclipse-cyclonedds/cyclonedds-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
126 lines (123 loc) · 4.06 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
#
# Copyright(c) 2021 to 2022 ZettaScale Technology and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
# v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
trigger: [ '*' ]
pr: [ '*' ]
variables:
build_type: RelWithDebugInfo
run-fuzzing: false
jobs:
- job: BuildCyclone
pool:
vmImage: $(image)
strategy:
matrix:
'Ubuntu 20.04 LTS':
image: ubuntu-20.04
'macOS 10.15':
image: macOS-10.15
'Windows Server 2019':
image: windows-2019
'Windows Server 2019 Debug':
image: windows-2019
build_type: Debug
steps:
- template: /.azure/templates/build-cyclone.yml
- publish: cyclone-$(Agent.OS)-$(build_type)
artifact: cyclone-$(Agent.OS)-$(build_type)
- job: RuntimeTests
dependsOn: BuildCyclone
pool:
vmImage: $(image)
strategy:
matrix:
'Ubuntu 20.04 LTS with Python 3.7':
image: ubuntu-20.04
python-version: "3.7"
'Ubuntu 20.04 LTS with Python 3.8':
image: ubuntu-20.04
python-version: "3.8"
'Ubuntu 20.04 LTS with Python 3.9':
image: ubuntu-20.04
python-version: "3.9"
'Ubuntu 20.04 LTS with Python 3.10':
image: ubuntu-20.04
python-version: "3.10"
'macOS 10.15 with Python 3.10':
image: macOS-10.15
python-version: "3.10"
'Windows Server 2019 with Python 3.7':
image: windows-2019
python-version: "3.7"
'Windows Server 2019 with Python 3.10':
image: windows-2019
python-version: "3.10"
'Windows Server 2019, Cyclone Debug, with Python 3.10':
image: windows-2019
python-version: "3.10"
build_type: Debug
'Fuzzer on Ubuntu 20.04 LTS with Python 3.7':
image: ubuntu-20.04
python-version: "3.7"
run-fuzzing: true
'Fuzzer on Ubuntu 20.04 LTS with Python 3.8':
image: ubuntu-20.04
python-version: "3.8"
run-fuzzing: true
'Fuzzer on Ubuntu 20.04 LTS with Python 3.9':
image: ubuntu-20.04
python-version: "3.9"
run-fuzzing: true
'Fuzzer on Ubuntu 20.04 LTS with Python 3.10':
image: ubuntu-20.04
python-version: "3.10"
run-fuzzing: true
steps:
- download: current
artifact: cyclone-$(Agent.OS)-$(build_type)
- bash: |
echo "###vso[task.setvariable variable=CYCLONEDDS_HOME;]$(Pipeline.Workspace)/cyclone-$(Agent.OS)-$(build_type)"
echo "###vso[task.setvariable variable=CMAKE_PREFIX_PATH;]$(Pipeline.Workspace)/cyclone-$(Agent.OS)-$(build_type)"
chmod +x $(Pipeline.Workspace)/cyclone-$(Agent.OS)-$(build_type)/bin/* || true
name: set_cyclonedds_home
displayName: Set CYCLONEDDS_HOME
- pwsh: |
Write-Host "###vso[task.setvariable variable=PATH;]$(Pipeline.Workspace)\\cyclone-$(Agent.OS)-$(build_type)\\bin;${env:PATH}"
condition: eq(variables['Agent.OS'], 'Windows_NT')
displayName: Windows PATH setup
- bash: |
echo "###vso[task.setvariable variable=PATH;]$(Pipeline.Workspace)/cyclone-$(Agent.OS)-$(build_type)/bin:$PATH"
condition: ne(variables['Agent.OS'], 'Windows_NT')
displayName: Linux/Mac PATH setup
- template: /.azure/templates/build-test.yml
- job: CoverageReport
dependsOn: RuntimeTests
condition: succeededOrFailed()
pool:
vmImage: ubuntu-20.04
steps:
- bash: |
mkdir coverage
- task: DownloadPipelineArtifact@2
inputs:
path: coverage
displayName: Download Coverage
- task: UsePythonVersion@0
- bash: |
ls coverage
pip install --user coverage
python -m coverage combine ./coverage/*/.coverage
python -m coverage xml --ignore-errors --skip-empty --omit="**/__library__.py"
- task: PublishCodeCoverageResults@1
displayName: Publish Cobertura Coverage Report
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage.xml