forked from xtensor-stack/xtensor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
91 lines (81 loc) · 3.05 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
trigger:
- master
jobs:
# Configure, build, install, and test job
- job: 'build'
pool:
vmImage: 'vs2015-win2012r2'
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 --append channels conda-forge
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 ^
gtest ^
ninja ^
nlohmann_json ^
xtl==0.6.6 ^
xsimd ^
python=3.6
conda list
displayName: "Install conda packages"
# Install LLVM
# Note: LLVM distributed by conda is too old
- script: |
choco install llvm --yes
set PATH=C:\Program Files\LLVM\bin;%PATH%
echo '##vso[task.setvariable variable=PATH]%PATH%'
clang-cl --version
displayName: "Install LLVM"
# Configure
- 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 ^
-DBUILD_TESTS=ON ^
-DXTENSOR_USE_XSIMD=ON ^
$(Build.SourcesDirectory)
displayName: "Configure xtensor"
workingDirectory: $(Build.BinariesDirectory)
# Build
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
cmake --build . ^
--config Release ^
--target test_xtensor_lib ^
-- -v
displayName: "Build xtensor"
workingDirectory: $(Build.BinariesDirectory)/build
# Test
- script: |
setlocal EnableDelayedExpansion
cd test
.\test_xtensor_lib
displayName: "Test xtensor"
workingDirectory: $(Build.BinariesDirectory)/build/test