-
-
Notifications
You must be signed in to change notification settings - Fork 726
Expand file tree
/
Copy pathAzurePipelinesBatch.yml
More file actions
126 lines (111 loc) · 4.53 KB
/
AzurePipelinesBatch.yml
File metadata and controls
126 lines (111 loc) · 4.53 KB
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
# Build triggered on a rolling or batch basis on the main and release branches. They may take longer than the standard CI configurations.
name: ITK.Batch
trigger:
batch: true
branches:
include:
- main
- release*
pr: none
variables:
ExternalDataVersion: 5.4.5
CCACHE_DIR: $(Pipeline.Workspace)/.ccache
CCACHE_BASEDIR: $(Build.SourcesDirectory)
CCACHE_COMPILERCHECK: content
CCACHE_NOHASHDIR: 'true'
CCACHE_NODIRECT: '1'
jobs:
- job: Windows
timeoutInMinutes: 0
cancelTimeoutInMinutes: 300
strategy:
maxParallel: 2
matrix:
v143:
CTEST_CMAKE_GENERATOR_TOOLSET: v143
CTEST_CMAKE_GENERATOR_PLATFORM: x64
CTEST_CONFIGURATION_TYPE: Release
CTEST_CMAKE_GENERATOR: "Visual Studio 17 2022"
imageName: 'windows-2022'
v142:
CTEST_CMAKE_GENERATOR_TOOLSET: v142
CTEST_CMAKE_GENERATOR_PLATFORM: x64
CTEST_CONFIGURATION_TYPE: Release
CTEST_CMAKE_GENERATOR: "Visual Studio 17 2022"
imageName: 'windows-2022'
pool:
vmImage: $(imageName)
steps:
- checkout: self
clean: true
fetchDepth: 5
- script: |
if DEFINED SYSTEM_PULLREQUEST_SOURCECOMMITID git checkout $(System.PullRequest.SourceCommitId)
displayName: Checkout pull request HEAD
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
architecture: 'x64'
- script: |
pip3 install ninja
pip3 install --upgrade setuptools
pip3 install lxml scikit-ci-addons
choco install ccache -y
displayName: 'Install dependencies'
- script: |
git clone -b dash-board-github-ci-instrument-groupings --single-branch https://github.com/hjmjohnson/ITK.git ITK-dashboard
curl -L https://github.com/InsightSoftwareConsortium/ITK/releases/download/v$(ExternalDataVersion)/InsightData-$(ExternalDataVersion).tar.gz -O
cmake -E tar xfz InsightData-$(ExternalDataVersion).tar.gz
cmake -E rename InsightToolkit-$(ExternalDataVersion)/.ExternalData/CID $(Build.SourcesDirectory)/.ExternalData/CID
workingDirectory: $(Agent.BuildDirectory)
displayName: 'Download dashboard script and testing data'
- task: Cache@2
inputs:
key: '"ccache" | "$(Agent.OS)" | "$(Build.SourceVersion)"'
restoreKeys: |
"ccache" | "$(Agent.OS)"
path: $(CCACHE_DIR)
displayName: 'Restore ccache'
- bash: ccache --evict-older-than 7d
displayName: 'Evict old ccache entries'
- bash: |
cat > dashboard.cmake << EOF
set(CTEST_BUILD_CONFIGURATION "$(CTEST_CONFIGURATION_TYPE)")
set(CTEST_CMAKE_GENERATOR_TOOLSET "$(CTEST_CMAKE_GENERATOR_TOOLSET)")
set(CTEST_CMAKE_GENERATOR_PLATFORM "$(CTEST_CMAKE_GENERATOR_PLATFORM)")
set(CTEST_CMAKE_GENERATOR "$(CTEST_CMAKE_GENERATOR)")
set(dashboard_cache "
BUILD_SHARED_LIBS:BOOL=ON
BUILD_EXAMPLES:BOOL=OFF
ITK_WRAP_PYTHON:BOOL=OFF
ITK_USE_CCACHE:BOOL=ON
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
")
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
EOF
cat dashboard.cmake
workingDirectory: $(Agent.BuildDirectory)/ITK-dashboard
displayName: 'Configure CTest script'
- script: |
cmake --version
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -V -j 2
displayName: 'Build and test'
env:
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_MAXSIZE: 2.4G
- script: python $(Build.SourcesDirectory)/Testing/ContinuousIntegration/report_build_diagnostics.py $(Build.SourcesDirectory)-build
condition: succeededOrFailed()
displayName: 'Report build warnings and errors'
- script: |
ci_addons ctest_junit_formatter $(Build.SourcesDirectory)-build > $(Agent.BuildDirectory)/JUnitTestResults.xml
condition: succeededOrFailed()
displayName: 'Format CTest output in JUnit format'
- task: PublishTestResults@2
inputs:
testResultsFiles: "$(Agent.BuildDirectory)/JUnitTestResults.xml"
testRunTitle: 'CTest $(Agent.OS)'
condition: succeededOrFailed()
displayName: 'Publish test results'