Skip to content

Commit b6c88ef

Browse files
authored
Merge pull request #120 from JohanMabille/azure
Added Azure Pipelines
2 parents adabac1 + d273de6 commit b6c88ef

File tree

5 files changed

+110
-0
lines changed

5 files changed

+110
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
jobs:
2+
- job: 'Linux'
3+
strategy:
4+
matrix:
5+
gcc_7:
6+
image_name: 'ubuntu-16.04'
7+
pool:
8+
vmImage: $(image_name)
9+
timeoutInMinutes: 360
10+
steps:
11+
12+
- bash: echo "##vso[task.prependpath]$CONDA/bin"
13+
displayName: Add conda to PATH
14+
15+
- template: unix-build.yml
16+
parameters:
17+
platform: 'Linux'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
jobs:
2+
- job: 'OSX'
3+
strategy:
4+
matrix:
5+
macOS_10_15:
6+
image_name: 'macOS-10.15'
7+
pool:
8+
vmImage: $(image_name)
9+
variables:
10+
CC: clang
11+
CXX: clang++
12+
timeoutInMinutes: 360
13+
steps:
14+
- script: |
15+
echo "Removing homebrew for Azure to avoid conflicts with conda"
16+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
17+
displayName: Remove homebrew
18+
19+
- bash: |
20+
echo "##vso[task.prependpath]$CONDA/bin"
21+
sudo chown -R $USER $CONDA
22+
displayName: Add conda to PATH
23+
24+
- template: unix-build.yml
25+
parameters:
26+
platform: 'OSX'

.azure-pipelines/unix-build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
parameters:
2+
- name: 'platform'
3+
type: string
4+
5+
steps:
6+
- script: |
7+
conda config --set always_yes yes --set changeps1 no
8+
conda update -q conda
9+
conda env create --file environment-dev.yml
10+
displayName: Install dependencies
11+
12+
- script: |
13+
source activate xtensor-io
14+
conda install gxx_linux-64 libgcc -c conda-forge
15+
condition: eq('${{ parameters.platform }}', 'Linux')
16+
displayName: Install conda-forge compilers
17+
18+
- script: |
19+
source activate xtensor-io
20+
export LDFLAGS="${LDFLAGS} -Wl,-rpath,$CONDA_PREFIX/lib"
21+
export LINKFLAGS="${LDFLAGS}"
22+
mkdir build
23+
cd build
24+
cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $(Build.SourcesDirectory)
25+
displayName: Configure xtensor-io
26+
workingDirectory: $(Build.BinariesDirectory)
27+
28+
- script: |
29+
source activate xtenso-io
30+
make -j2 test_xtensor_io_lib
31+
make -j2 test_xtensor_io_ho
32+
displayName: Build xtenso-io
33+
workingDirectory: $(Build.BinariesDirectory)/build
34+
35+
- script: |
36+
source activate xtenso-io
37+
./test_xtensor_io_lib
38+
./test_xtensor_io_ho
39+
displayName: Test xtenso-io
40+
workingDirectory: $(Build.BinariesDirectory)/build/test
41+

azure-pipelines.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
trigger:
2+
- master
3+
4+
jobs:
5+
- template: ./.azure-pipelines/azure-pipelines-linux.yml
6+
- template: ./.azure-pipelines/azure-pipelines-osx.yml
7+

environment-dev.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: xtensor
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
# Build dependencies
6+
- cmake
7+
# Host dependencies
8+
- openimageio=2.1.10
9+
- libsndfile=1.0.28
10+
- zlib=1.2.11
11+
- highfive=2.1.1
12+
- blosc
13+
- gdal
14+
- nlohmann_json
15+
- google-cloud-cpp=1.19.0
16+
- aws-sdk-cpp
17+
- xtensor=0.21.10
18+
- cpp-filesystem
19+

0 commit comments

Comments
 (0)