-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
127 lines (118 loc) · 4.91 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
trigger:
- master
jobs:
- job: 'vs2015_clang_release'
pool:
# NOTE: this is the same image currently used by conda.
# Like conda, we'll be using vs2015, not vs2017. If we
# try to use the vs2015 image, we get some DLL errors
# related to dbgeng, which *I think* are due to the
# fact that the vs2015 image is using an older version of
# the OS.
vmImage: 'vs2017-win2016'
timeoutInMinutes: 360
steps:
# Install Chocolatey (https://chocolatey.org/install#install-with-powershellexe)
- powershell: |
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Write-Host "##vso[task.setvariable variable=PATH]$env:PATH"
choco --version
displayName: "Install Chocolatey"
# Install Miniconda
- script: |
choco install miniconda3 --yes
set PATH=C:\tools\miniconda3\Scripts;C:\tools\miniconda3;C:\tools\miniconda3\Library\bin;%PATH%
echo '##vso[task.setvariable variable=PATH]%PATH%'
set LIB=C:\tools\miniconda3\Library\lib;%LIB%
echo '##vso[task.setvariable variable=LIB]%LIB%'
conda --version
displayName: "Install Miniconda"
# Configure Miniconda
- script: |
conda config --set always_yes yes
conda config --add channels conda-forge
conda config --set channel_priority strict
conda info
displayName: "Configure Miniconda"
# Create conda enviroment
# Note: conda activate doesn't work here, because it creates a new shell!
- script: |
conda install cmake ^
clangdev ^
ninja ^
boost-cpp ^
boost ^
matplotlib ^
scipy ^
numpy ^
python=3.8
conda list
displayName: "Install conda packages"
- script: |
setlocal EnableDelayedExpansion
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
mkdir build
cd build
cmake .. -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DBoost_NO_BOOST_CMAKE=ON ^
-DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^
-DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^
-DPYKEP_BUILD_SPICE=yes ^
-DPYKEP_BUILD_TESTS=yes
cmake --build . -- -v
cmake --build . --target install
ctest -V .
cd ..
mkdir build_pykep
cd build_pykep
cmake .. -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DBoost_NO_BOOST_CMAKE=ON ^
-DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^
-DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^
-DPYKEP_BUILD_KEP_TOOLBOX=no ^
-DPYKEP_BUILD_PYKEP=yes
cmake --build . -- -v
cmake --build . --target install
python -c "import pykep.test; pykep.test.run_test_suite()"
## Configure, build and test (kep_toolbox)
# script: |
# setlocal EnableDelayedExpansion
# mkdir build
# cd build
# cmake .. -G "Visual Studio 15 2017" ^
# -DBoost_NO_BOOST_CMAKE=ON ^
# -DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^
# -DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^
# -DPYKEP_BUILD_KEP_TOOLBOX=yes ^
# -DPYKEP_BUILD_PYKEP=no ^
# -DPYKEP_BUILD_SPICE=no ^
# -DPYKEP_BUILD_TESTS=yes
# cmake --build . --config RelWithDebInfo
# cmake --build . --config RelWithDebInfo --target install
# set PATH=%PATH%;%CD%\RelWithDebInfo
# ctest -j4 -V -C RelWithDebInfo
# cd ..
# displayName: "Configure, build and test keplerian_toolbox"
## Configure, build and test (pykep)
# script: |
# setlocal EnableDelayedExpansion
# mkdir build_pykep
# cd build_pykep
# cmake .. -G "Visual Studio 15 2017" ^
# -DCMAKE_BUILD_TYPE=Release ^
# -DBoost_NO_BOOST_CMAKE=ON ^
# -DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^
# -DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^
# -DPYKEP_BUILD_KEP_TOOLBOX=no ^
# -DPYKEP_BUILD_PYKEP=yes ^
# cmake --build . --config RelWithDebInfo
# cmake --build . --config RelWithDebInfo --target install
# python -c "import pykep.test; pykep.test.run_test_suite()"
# displayName: "Configure, build and test pykep"