-
Notifications
You must be signed in to change notification settings - Fork 87
/
.azure-pipelines.yml
112 lines (91 loc) · 3.37 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
trigger:
- master
variables:
# It's important to put these in a path that won't change
PARAVIEW_SOURCE_FOLDER: /tmp/paraview_source
PARAVIEW_BUILD_FOLDER: /tmp/paraview_build
PARAVIEW_INSTALL_FOLDER: /tmp/paraview_install
PARAVIEW_DIR: $(PARAVIEW_INSTALL_FOLDER)
jobs:
- job: Build
timeoutInMinutes: 0
strategy:
matrix:
Linux:
imageName: 'ubuntu-20.04'
Mac:
imageName: 'macos-11'
Windows:
imageName: 'windows-2019'
# The D:\ drive (default) on Windows only has about 4 GB of disk
# space available, which is not enough to build ParaView.
# But the C:\ drive has a lot of free space, around 150 GB.
PARAVIEW_SOURCE_FOLDER: 'C:\paraview_source'
PARAVIEW_BUILD_FOLDER: 'C:\paraview_build'
PARAVIEW_INSTALL_FOLDER: 'C:\paraview_install'
# Building tomviz from the paraview install directory on Linux
# and Mac seems to work fine. However, on Windows, there are
# some segmentation faults when running the tests. For now, let's
# use the paraview build directory to build and run tomviz.
PARAVIEW_DIR: $(PARAVIEW_BUILD_FOLDER)
pool:
vmImage: $(imageName)
steps:
- checkout: self
submodules: true
- task: UsePythonVersion@0
inputs:
versionSpec: 3.8
displayName: Enable Python 3.8
- bash: scripts/azure-pipelines/install.sh
displayName: Install Dependencies
- bash: scripts/azure-pipelines/install_python_deps.sh
displayName: Install Python Dependencies
- script: git config --global http.sslVerify false
displayName: Temporarily disable SSL cert verification
# Use the OS's native script language for this command
- script: git clone --recursive https://github.com/openchemistry/paraview $(PARAVIEW_SOURCE_FOLDER)
displayName: Clone ParaView
- bash: scripts/azure-pipelines/prepend_paths.sh
displayName: Prepend Paths
# This will set up the MSVC environment for future commands
- task: BatchScript@1
inputs:
filename: scripts/azure-pipelines/setup_msvc_env.bat
modifyEnvironment: True
condition: eq(variables['Agent.OS'], 'Windows_NT')
displayName: Setup MSVC Environment
# Creates a "deps_md5sum" variable that, when this has changed,
# automatically re-build paraview.
- bash: scripts/azure-pipelines/create_deps_md5sum.sh
displayName: Create Dependency md5sum
- task: Cache@2
inputs:
# Change the "v*" at the end to force a re-build
key: paraview | $(Agent.OS) | $(deps_md5sum) | v4
path: $(PARAVIEW_DIR)
cacheHitVar: PARAVIEW_DIR_RESTORED
displayName: Restore ParaView Dir
- bash: scripts/azure-pipelines/build_paraview.sh
condition: ne(variables.PARAVIEW_DIR_RESTORED, 'true')
displayName: Build ParaView
- bash: scripts/azure-pipelines/build_tomviz.sh
displayName: Build Tomviz
- bash: scripts/azure-pipelines/run_ctest.sh
displayName: Run CTest
- bash: scripts/azure-pipelines/run_pytest.sh
displayName: Run PyTest
- bash: scripts/azure-pipelines/clean_memory.sh
displayName: Clean up memory (for uploading ParaView cache)
- job: clang_format
pool:
vmImage: 'ubuntu-20.04'
steps:
- bash: scripts/azure-pipelines/run_clang_format_diff.sh
displayName: Run clang-format
- job: flake8
pool:
vmImage: 'ubuntu-20.04'
steps:
- bash: scripts/azure-pipelines/run_flake8.sh
displayName: Run flake8