Skip to content

Commit

Permalink
Merge pull request InsightSoftwareConsortium#5160 from devbanu/ci_cxx…
Browse files Browse the repository at this point in the history
…20_job

ENH: COMP: Adding LinuxCxx20 job to Azure continuous integration.
  • Loading branch information
thewtex authored Jan 24, 2025
2 parents 67a0a8b + 7356b0e commit 240fa0f
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions Testing/ContinuousIntegration/AzurePipelinesLinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,73 @@ jobs:
testRunTitle: 'CTest $(Agent.OS) LegacyRemoved'
condition: succeededOrFailed()
displayName: 'Publish test results'

- job: LinuxCxx20
timeoutInMinutes: 0
cancelTimeoutInMinutes: 300
pool:
vmImage: ubuntu-24.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(BUILD_NAME_SUFFIX "Cxx20")
set(dashboard_cache "
CMAKE_CXX_STANDARD:STRING=20
CMAKE_CXX_STANDARD_REQUIRED: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) Cxx20"
condition: succeededOrFailed()
displayName: "Publish test results"

0 comments on commit 240fa0f

Please sign in to comment.