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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
name: ITK.Linux
trigger:
branches:
include:
- master
- release*
paths:
exclude:
- '*.md'
- LICENSE
- NOTICE
- Documentation/*
- Utilities/Debugger/*
- Utilities/ITKv5Preparation/*
- Utilities/Maintenance/*
pr:
paths:
exclude:
- '*.md'
- LICENSE
- NOTICE
- Documentation/*
- Utilities/Debugger/*
- Utilities/ITKv5Preparation/*
- Utilities/Maintenance/*
variables:
ExternalDataVersion: 5.4.3
jobs:
- job: Linux
timeoutInMinutes: 0
cancelTimeoutInMinutes: 300
pool:
vmImage: ubuntu-22.04
steps:
- checkout: self
clean: true
fetchDepth: 5
- bash: |
set -x
if [ -n "$(System.PullRequest.SourceCommitId)" ]; then
git checkout $(System.PullRequest.SourceCommitId)
fi
displayName: 'Checkout pull request HEAD'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
architecture: 'x64'
- bash: |
set -x
sudo pip3 install ninja
sudo apt-get update
sudo apt-get install -y python3-venv
sudo python3 -m pip install lxml scikit-ci-addons
displayName: 'Install dependencies'
- bash: |
set -x
git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/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'
- bash: |
cat > dashboard.cmake << EOF
set(CTEST_BUILD_CONFIGURATION "MinSizeRel")
set(CTEST_CMAKE_GENERATOR "Ninja")
set(dashboard_cache "
BUILD_SHARED_LIBS:BOOL=OFF
BUILD_EXAMPLES:BOOL=OFF
ITK_WRAP_PYTHON:BOOL=OFF
")
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
EOF
cat dashboard.cmake
workingDirectory: $(Agent.BuildDirectory)/ITK-dashboard
displayName: 'Configure CTest script'
- bash: |
set -x
c++ --version
cmake --version
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
displayName: 'Build and test'
env:
CTEST_OUTPUT_ON_FAILURE: 1
- 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'
- job: LinuxLegacyRemoved
timeoutInMinutes: 0
cancelTimeoutInMinutes: 300
pool:
vmImage: ubuntu-22.04
steps:
- checkout: self
clean: true
fetchDepth: 5
- bash: |
set -x
if [ -n "$(System.PullRequest.SourceCommitId)" ]; then
git checkout $(System.PullRequest.SourceCommitId)
fi
displayName: 'Checkout pull request HEAD'
- bash: |
set -x
sudo pip3 install ninja
sudo apt-get update
sudo apt-get install -y python3-venv
sudo python3 -m pip install lxml scikit-ci-addons
displayName: 'Install dependencies'
- bash: |
set -x
git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/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'
- bash: |
cat > dashboard.cmake << EOF
set(CTEST_BUILD_CONFIGURATION "MinSizeRel")
set(CTEST_CMAKE_GENERATOR "Ninja")
set(BUILD_NAME_SUFFIX "LegacyRemoved")
set(dashboard_cache "
ITK_LEGACY_REMOVE:BOOL=ON
BUILD_SHARED_LIBS:BOOL=OFF
BUILD_EXAMPLES:BOOL=OFF
ITK_WRAP_PYTHON:BOOL=OFF
")
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
EOF
cat dashboard.cmake
workingDirectory: $(Agent.BuildDirectory)/ITK-dashboard
displayName: 'Configure CTest script'
- bash: |
set -x
c++ --version
cmake --version
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
displayName: 'Build and test'
env:
CTEST_OUTPUT_ON_FAILURE: 1
- 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) LegacyRemoved'
condition: succeededOrFailed()
displayName: 'Publish test results'
|