forked from UCL/STIR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.appveyor.yml
More file actions
92 lines (78 loc) · 2.93 KB
/
.appveyor.yml
File metadata and controls
92 lines (78 loc) · 2.93 KB
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
#shallow_clone: true
clone_depth: 10
skip_commits:
files:
- .github/**/*
- 'CITATION.cff'
- '**/*.md'
- '**/*.html'
- '**/*.htm'
- '**/*.tex'
version: '{build}'
os:
- Visual Studio 2022
- Visual Studio 2019
platform:
- x64
configuration:
- Release
build:
verbosity: detailed
environment:
CMAKE_INSTALL_PREFIX: C:\projects\stir\install\
init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
cache:
- '%LOCALAPPDATA%\ccache'
install:
- git submodule update --init --recursive
build_script:
- set vcvars="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
- if not exist %vcvars% set vcvars="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- call %vcvars%
- cl
# find boost on Appveyor. Version depends on VM
- for /D %%d in (C:\Libraries\boost_*) do set BOOST_ROOT=%%d
- echo Using Boost %BOOST_ROOT%
# find miniconda
- for /D %%d in (C:\Miniconda*-x64) do set MINICONDA=%%d
- echo Using Miniconda %MINICONDA%
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%MINICONDA%\\Library\\bin;%PATH%"
# install parallelproj and Python stuff
# don't do numpy here due to https://github.com/conda-forge/numpy-feedstock/issues/350
- conda create --name stirbuild -c conda-forge -yq libparallelproj swig pytest ccache ninja cmake
- CALL conda.bat activate stirbuild
- python --version
- pip install numpy matplotlib
# basic test if numpy works
- python -c "import numpy"
# get ccache stats
- ccache -s
- mkdir build
- mkdir install
- cd build
- cmake .. -GNinja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_INSTALL_PREFIX="C:\projects\stir\install" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_CONFIGURATION_TYPES=%CONFIGURATION% -DSTIR_OPENMP:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=OFF -DBUILD_SWIG_PYTHON:BOOL=ON -DPython_EXECUTABLE=%CONDA_PREFIX%\python.exe -DCMAKE_PREFIX_PATH:PATH="%CONDA_PREFIX%"
- cmake --build . --config %CONFIGURATION%
#- cmake --build . --target install --config %CONFIGURATION%
# the above works, but possibly calling ninja directly is faster
- ninja install
# get ccache stats
- ccache -s
- conda deactivate
test_script:
- cd C:\projects\stir\build
- CALL conda.bat activate stirbuild
- python --version
- ctest --output-on-failure -C %CONFIGURATION%
- cd ..\recon_test_pack
- run_tests --nointbp "C:\projects\stir\install\bin\"
- cd ..\src
- "set PYTHONPATH=C:\\projects\\stir\\install\\python"
- python -m pytest .
- echo "Running Python examples"
- cd ..\examples\python
- rem Disabled as fails, probably because of plotting
- rem python recon_demo_gradient.py
- conda deactivate
on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))