File: AzurePipelinesWindowsPython.yml

package info (click to toggle)
insighttoolkit5 5.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 704,404 kB
  • sloc: cpp: 783,697; ansic: 628,724; xml: 44,704; fortran: 34,250; python: 22,874; sh: 4,078; pascal: 2,636; lisp: 2,158; makefile: 461; yacc: 328; asm: 205; perl: 203; lex: 146; tcl: 132; javascript: 98; csh: 81
file content (109 lines) | stat: -rw-r--r-- 3,649 bytes parent folder | download
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
name: ITK.Windows.Python

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: Windows
  timeoutInMinutes: 0
  cancelTimeoutInMinutes: 300
  pool:
    vmImage: 'windows-2019'
  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.8'
        architecture: 'x64'

    - script: |
        python -m pip install ninja numpy>=1.20 typing-extensions
        python -m pip install --upgrade setuptools
        python -m pip install scikit-ci-addons dask distributed lxml
      displayName: 'Install dependencies'

    - script: |
        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'

# Note, UsePythonVersion sets PATH to the specified version, so we have to explicitly disable the Windows Registry search in FindPython3
    - bash: |
        cat > dashboard.cmake << EOF
        set(CTEST_BUILD_CONFIGURATION "MinSizeRel")
        set(CTEST_CMAKE_GENERATOR "Ninja")
        set(BUILD_NAME_SUFFIX "-Python")
        set(ENV{CC} cl.exe)
        set(ENV{CXX} cl.exe)
        set(dashboard_cache "
          DISABLE_MODULE_TESTS:BOOL=ON
          BUILD_SHARED_LIBS:BOOL=ON
          BUILD_EXAMPLES:BOOL=OFF
          ITK_WRAP_PYTHON:BOOL=ON
          ITK_BUILD_DEFAULT_MODULES:BOOL=OFF
          ITKGroup_Core:BOOL=ON
          Module_ITKThresholding:BOOL=ON
          Module_ITKImageIntensity:BOOL=ON
          Module_ITKBridgeNumPy:BOOL=ON
          Module_ITKDisplacementField:BOOL=ON
          Python3_FIND_REGISTRY=LAST
        ")
        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 (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.2
        ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4 -L Python
      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'