forked from NERSC/timemory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
157 lines (146 loc) · 5.18 KB
/
.appveyor.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
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
version: 2.0.{build}
skip_commits:
files:
- docs/*
- .github/*
- scripts/*
- recipe/*
- spack/*
- docker/*
- '**/*.md'
- pyproject.toml
- pytest.ini
- requirements.txt
- setup.*
- VERSION
skip_tags: true
skip_branch_with_pr: true
max_jobs: 2
image:
- Visual Studio 2019
test: on
build:
parallel: true
platform:
- x64
environment:
CONTINUOUS_INTEGRATION: "true"
matrix:
- CONDA: 38
CPP: 17
CONFIG: Release
EXAMPLES: "OFF"
TOOLS: "OFF"
WINSOCK: "OFF"
USE_ARCH: "OFF"
USE_PYTHON: "ON"
BUILD_C: "ON"
BUILD_SHARED: "ON"
BUILD_STATIC: "OFF"
BUILD_TESTING: "ON"
LINE_PROFILER: "ON"
- PYTHON: 37
CPP: 14
CONFIG: Debug
EXAMPLES: "ON"
TOOLS: "ON"
WINSOCK: "OFF"
USE_ARCH: "OFF"
USE_PYTHON: "ON"
BUILD_C: "OFF"
BUILD_SHARED: "OFF"
BUILD_STATIC: "ON"
BUILD_TESTING: "OFF"
LINE_PROFILER: "OFF"
install:
# Configure environment
- ps: |
# CMake architecture
if ($env:PLATFORM -eq "x64") {
$env:CMAKE_ARCH = "x64"
}
# CMake generator
if ($env:APPVEYOR_JOB_NAME -like "*Visual Studio 2017*") {
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
} else {
$env:CMAKE_GENERATOR = "Visual Studio 16 2019"
}
# Python environment
if ($env:PYTHON) {
if ($env:PLATFORM -eq "x64") {
$env:PATH = "C:\Python$env:PYTHON-x64;C:\Python$env:PYTHON-x64\Scripts;C:\Users\appveyor\AppData\Roaming\Python\Python$env:PYTHON\Scripts;$env:PATH"
$env:CMAKE_PREFIX_PATH = "C:\Python$env:PYTHON-x64;C:\Python$env:PYTHON-x64\Scripts"
$env:PYTHON_EXE = "C:\Python$env:PYTHON-x64\python.exe"
} else {
$env:PATH = "C:\Python$env:PYTHON;C:\Python$env:PYTHON\Scripts;C:\Users\appveyor\AppData\Roaming\Python\Python$env:PYTHON\Scripts;$env:PATH"
$env:CMAKE_PREFIX_PATH = "C:\Python$env:PYTHON;C:\Python$env:PYTHON\Scripts"
$env:PYTHON_EXE = "C:\Python$env:PYTHON\python.exe"
}
python -m pip install --disable-pip-version-check --user --upgrade pip wheel
python -m pip install --user matplotlib numpy pillow cython six pandas pydot multiprocess
} elseif ($env:CONDA) {
if ($env:PLATFORM -eq "x64") {
$env:PATH = "C:\Miniconda$env:CONDA-x64;C:\Miniconda$env:CONDA-x64\Scripts;$env:PATH"
$env:CMAKE_PREFIX_PATH = "C:\Miniconda$env:CONDA-x64;C:\Miniconda$env:CONDA-x64\Scripts"
$env:PYTHONHOME = "C:\Miniconda$env:CONDA-x64"
$env:PYTHON_EXE = "C:\Miniconda$env:CONDA-x64\python.exe"
} else {
$env:PATH = "C:\Miniconda$env:CONDA;C:\Miniconda$env:CONDA\Scripts;$env:PATH"
$env:CMAKE_PREFIX_PATH = "C:\Miniconda$env:CONDA;C:\Miniconda$env:CONDA\Scripts"
$env:PYTHONHOME = "C:\Miniconda$env:CONDA"
$env:PYTHON_EXE = "C:\Miniconda$env:CONDA\python.exe"
}
conda update -y -n base conda
conda install -y -c conda-forge -c defaults matplotlib numpy pillow cython six pandas pydot multiprocess
}
$env:TIMEMORY_FILE_OUTPUT = "OFF"
$env:TIMEMORY_AUTO_OUTPUT = "ON"
mkdir "C:\Users\appveyor\CTestTemp"
$env:TEMP = "C:\Users\appveyor\CTestTemp"
build_script:
- mkdir build-timemory
- cd build-timemory
- cmake .. -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
-DBUILD_SHARED_LIBS="%BUILD_SHARED%"
-DBUILD_STATIC_LIBS="%BUILD_STATIC%"
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE="%CONFIG%"
-DCMAKE_CXX_STANDARD="%CPP%"
-DCMAKE_INSTALL_PREFIX=..\install-timemory
-DPYTHON_EXECUTABLE="%PYTHON_EXE%"
-DTIMEMORY_USE_MPI=OFF
-DTIMEMORY_USE_PYTHON="%USE_PYTHON%"
-DTIMEMORY_USE_ARCH="%USE_ARCH%"
-DTIMEMORY_BUILD_C="%BUILD_C%"
-DTIMEMORY_BUILD_EXAMPLES="%EXAMPLES%"
-DTIMEMORY_BUILD_TESTING=OFF
-DTIMEMORY_BUILD_MINIMAL_TESTING="%BUILD_TESTING%"
-DTIMEMORY_BUILD_TOOLS="%TOOLS%"
-DTIMEMORY_BUILD_GOOGLE_TEST="%BUILD_TESTING%"
-DTIMEMORY_USE_WINSOCK="%WINSOCK%"
-DTIMEMORY_BUILD_PYTHON_LINE_PROFILER="%LINE_PROFILER%"
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmake --build . --config "%CONFIG%" --target ALL_BUILD -- /m /v:m /logger:%MSBuildLogger%
- cmake --build . --config "%CONFIG%" --target INSTALL -- /m /v:m /logger:%MSBuildLogger%
- ls
- ps: |
if ($env:BUILD_TESTING -eq "ON") {
iex "ctest --output-on-failure -C $env:CONFIG"
}
- ps: |
if ($env:EXAMPLES -eq "ON") {
iex ".\outputs\runtime\$env:CONFIG\ex_optional_off.exe"
iex ".\outputs\runtime\$env:CONFIG\ex_cxx_basic.exe"
iex ".\outputs\runtime\$env:CONFIG\ex_optional_on.exe"
iex ".\outputs\runtime\$env:CONFIG\ex_cxx_overhead.exe"
iex ".\outputs\runtime\$env:CONFIG\ex_cxx_tuple.exe"
if ($env:BUILD_C -eq "ON") {
iex ".\outputs\runtime\$env:CONFIG\ex_c_minimal.exe"
iex ".\outputs\runtime\$env:CONFIG\ex_c_minimal_library.exe"
iex ".\outputs\runtime\$env:CONFIG\ex_c_timing.exe"
}
}
- ps: |
if ($env:USE_PYTHON -eq "ON") {
cmake -P tests/test-python-install-import.cmake
}