forked from openPMD/openPMD-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
132 lines (111 loc) · 4.24 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
environment:
matrix:
- TARGET_ARCH: x86
CONDA_PY: 36
CONDA_INSTALL_LOCN: C:\\Miniconda36
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x86
SHARED: ON
- TARGET_ARCH: x64
CONDA_PY: 37
CONDA_INSTALL_LOCN: C:\\Miniconda37-x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x64
SHARED: ON
- TARGET_ARCH: x86
CONDA_PY: 37
CONDA_INSTALL_LOCN: C:\\Miniconda37
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x86
SHARED: ON
- TARGET_ARCH: x64
CONDA_PY: 36
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x64
SHARED: OFF
configuration:
# - Debug
- Release
# Clone directory.
clone_folder: c:\projects\openpmd-api
# Fetch repository as zip archive.
shallow_clone: false
# Set the clone depth.
clone_depth: 1
# Build tags (GitHub only)
skip_tags: false
branches:
except:
- azure_install
- coverity_scan
- gh-pages
init:
# Print AppVeyor environment variables
- cmd: echo "%APPVEYOR%"
- cmd: echo "%CI%"
- cmd: echo "%APPVEYOR_API_URL%"
- cmd: echo "%APPVEYOR_ACCOUNT_NAME%"
- cmd: echo "%APPVEYOR_BUILD_WORKER_IMAGE%"
- cmd: echo "%APPVEYOR_PROJECT_ID%"
- cmd: echo "%APPVEYOR_PROJECT_NAME%"
- cmd: echo "%APPVEYOR_PROJECT_SLUG%"
- cmd: echo "%APPVEYOR_BUILD_FOLDER%"
- cmd: echo "%APPVEYOR_BUILD_ID%"
- cmd: echo "%APPVEYOR_BUILD_NUMBER%"
- cmd: echo "%APPVEYOR_BUILD_VERSION%"
- cmd: echo "%APPVEYOR_PULL_REQUEST_NUMBER%"
- cmd: echo "%APPVEYOR_PULL_REQUEST_TITLE%"
- cmd: echo "%APPVEYOR_JOB_ID%"
- cmd: echo "%APPVEYOR_REPO_PROVIDER%"
- cmd: echo "%APPVEYOR_REPO_SCM%"
- cmd: echo "%APPVEYOR_REPO_NAME%"
- cmd: echo "%APPVEYOR_REPO_BRANCH%"
- cmd: echo "%APPVEYOR_REPO_TAG%"
- cmd: echo "%APPVEYOR_REPO_TAG_NAME%"
- cmd: echo "%APPVEYOR_REPO_COMMIT%"
- cmd: echo "%APPVEYOR_REPO_COMMIT_TIMESTAMP%"
- cmd: echo "%APPVEYOR_REPO_COMMIT_MESSAGE%"
- cmd: echo "%APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED%"
- cmd: echo "%APPVEYOR_SCHEDULED_BUILD%"
- cmd: echo "%APPVEYOR_FORCED_BUILD%"
- cmd: echo "%APPVEYOR_RE_BUILD%"
- cmd: echo "%PLATFORM%"
- cmd: echo "%TARGET_ARCH%"
- cmd: echo "%CONFIGURATION%"
- cmd: echo "%SHARED%"
install:
# Cywin's git breaks conda-build. (see https://github.com/conda-forge/conda-smithy-feedstock/pull/2)
- cmd: rmdir C:\cygwin /s /q
# Add path, activate `conda` and update conda.
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: conda update --yes --quiet conda
- cmd: set PYTHONUNBUFFERED=1
# Add our channels.
- cmd: conda config --set show_channel_urls true
- cmd: conda config --add channels defaults
- cmd: conda config --append channels conda-forge
# Configure the VM.
- cmd: conda install -n root --quiet --yes numpy>=1.15 cmake hdf5
# ADIOS2 build only for 64bit Windows and Python 3.6+
- cmd: if "%TARGET_ARCH%"=="x64" if %CONDA_PY% GEQ 36 conda install -n root --quiet --yes adios2
before_build:
- cmd: cd C:\projects\openpmd-api
- cmd: mkdir build
- cmd: cd build
# Download example files
- ps: ..\share\openPMD\download_samples.ps1
# Compiler & Generator Selection
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set OPENPMD_CMAKE_GENERATOR=Visual Studio 15 2017
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set OPENPMD_CMAKE_GENERATOR=Visual Studio 16 2019
- cmd: if "%TARGET_ARCH%"=="x64" set OPENPMD_CMAKE_GENERATOR=%OPENPMD_CMAKE_GENERATOR% Win64
# - cmd: if "%TARGET_ARCH%"=="x86" "C:\Program Files (x86)\Microsoft Visual Studio 15.9\VC\vcvarsall.bat" x86
# - cmd: if "%TARGET_ARCH%"=="x64" "C:\Program Files (x86)\Microsoft Visual Studio 15.9\VC\vcvarsall.bat" amd64
# CMake configure
- cmd: cmake -G "%OPENPMD_CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_SHARED_LIBS=%SHARED% -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX="%CONDA_INSTALL_LOCN%" -DCMAKE_INSTALL_BINDIR="Library\bin" ".."
build_script:
- cmd: cmake --build . --config %CONFIGURATION%
- cmd: cmake --build . --config %CONFIGURATION% --target install
test_script:
- cmd: ctest -V -C %CONFIGURATION%
- cmd: python -c "import openpmd_api; print(openpmd_api.__version__); print(openpmd_api.variants)"