forked from eclipse-cyclonedds/cyclonedds-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
121 lines (118 loc) · 3.83 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
#
# 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:
run-fuzzing: false
jobs:
- job: BuildCyclone
pool:
vmImage: $(image)
strategy:
matrix:
'Ubuntu 22.04 LTS':
image: ubuntu-22.04
'macOS 10.15':
image: macOS-11
'Windows Server':
image: windows-latest
steps:
- template: /.azure/templates/build-cyclone.yml
- publish: cyclone-$(Agent.OS)-Release
artifact: cyclone-$(Agent.OS)-Release
- job: RuntimeTests
dependsOn: BuildCyclone
pool:
vmImage: $(image)
strategy:
matrix:
'Ubuntu 22.04 LTS with Python 3.7':
image: ubuntu-22.04
python-version: "3.7"
'Ubuntu 22.04 LTS with Python 3.8':
image: ubuntu-22.04
python-version: "3.8"
'Ubuntu 22.04 LTS with Python 3.9':
image: ubuntu-22.04
python-version: "3.9"
'Ubuntu 22.04 LTS with Python 3.10':
image: ubuntu-22.04
python-version: "3.10"
'Ubuntu 22.04 LTS with Python 3.11':
image: ubuntu-22.04
python-version: "3.11"
'macOS 11 with Python 3.10':
image: macOS-11
python-version: "3.10"
'Windows Server with Python 3.7':
image: windows-latest
python-version: "3.7"
'Windows Server with Python 3.10':
image: windows-latest
python-version: "3.10"
'Fuzzer on Ubuntu 22.04 LTS with Python 3.7':
image: ubuntu-22.04
python-version: "3.7"
run-fuzzing: true
'Fuzzer on Ubuntu 22.04 LTS with Python 3.8':
image: ubuntu-22.04
python-version: "3.8"
run-fuzzing: true
'Fuzzer on Ubuntu 22.04 LTS with Python 3.9':
image: ubuntu-22.04
python-version: "3.9"
run-fuzzing: true
'Fuzzer on Ubuntu 22.04 LTS with Python 3.10':
image: ubuntu-22.04
python-version: "3.10"
run-fuzzing: true
steps:
- download: current
artifact: cyclone-$(Agent.OS)-Release
- bash: |
echo "###vso[task.setvariable variable=CYCLONEDDS_HOME;]$(Pipeline.Workspace)/cyclone-$(Agent.OS)-Release"
echo "###vso[task.setvariable variable=CMAKE_PREFIX_PATH;]$(Pipeline.Workspace)/cyclone-$(Agent.OS)-Release"
chmod +x $(Pipeline.Workspace)/cyclone-$(Agent.OS)-Release/bin/* || true
name: set_cyclonedds_home
displayName: Set CYCLONEDDS_HOME
- pwsh: |
Write-Host "###vso[task.setvariable variable=PATH;]$(Pipeline.Workspace)\\cyclone-$(Agent.OS)-Release\\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)-Release/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-22.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