Skip to content

Commit

Permalink
Merge pull request #18 from JohanMabille/azure
Browse files Browse the repository at this point in the history
Added Azure Pipelines
  • Loading branch information
JohanMabille committed Dec 1, 2020
2 parents 3917f25 + 9fca210 commit 6acb21c
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
jobs:
- job: 'Linux'
strategy:
matrix:
gcc_7:
image_name: 'ubuntu-16.04'
pool:
vmImage: $(image_name)
timeoutInMinutes: 360
steps:

- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH

- template: unix-build.yml
parameters:
platform: 'Linux'
26 changes: 26 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jobs:
- job: 'OSX'
strategy:
matrix:
macOS_10_15:
image_name: 'macOS-10.15'
pool:
vmImage: $(image_name)
variables:
CC: clang
CXX: clang++
timeoutInMinutes: 360
steps:
- script: |
echo "Removing homebrew for Azure to avoid conflicts with conda"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
displayName: Remove homebrew
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
displayName: Add conda to PATH
- template: unix-build.yml
parameters:
platform: 'OSX'
59 changes: 59 additions & 0 deletions .azure-pipelines/unix-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
parameters:
- name: 'platform'
type: string

steps:
- script: |
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda env create --file environment-dev.yml
displayName: Install dependencies
- script: |
source activate xtensor-zarr
conda install gxx_linux-64 libgcc -c conda-forge
condition: eq('${{ parameters.platform }}', 'Linux')
displayName: Install conda-forge compilers
- script: |
source activate xtensor-zarr
export LDFLAGS="${LDFLAGS} -Wl,-rpath,$CONDA_PREFIX/lib"
export LINKFLAGS="${LDFLAGS}"
mkdir build
cd build
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)
displayName: Configure xtensor-zarr
workingDirectory: $(Build.BinariesDirectory)
- script: |
source activate xtensor-zarr
make -j2 test_xtensor_zarr
displayName: Build xtensor-zarr
workingDirectory: $(Build.BinariesDirectory)/build
- script: |
source activate xtenso-zarr
./test_xtensor_zarr
displayName: Test xtensor-zarr
workingDirectory: $(Build.BinariesDirectory)/build/test
- script: |
source activate xtensor-zarr
mkdir dev_tmp
cd dev_tmp
wget https://github.com/alimanfoo/zarrita/archive/master.tar.gz -O zarrita.tar.gz -q
mkdir zarrita
tar zxf zarrita.tar.gz -C zarrita --strip-components 1
mv zarrita/zarrita.py ../test
displayName: Install zarrita
workingDirectory: $(Build.SourcesDirectory)
- script: |
source activate xtenso-zarr
python zarrita_write.py
python zarr_write.py
python zarrita_read.py
python zarr_read.py
displayName: Test xtensor-zarr
workingDirectory: $(Build.SourcesDirectory)/test
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
trigger:
- master

jobs:
- template: ./.azure-pipelines/azure-pipelines-linux.yml
- template: ./.azure-pipelines/azure-pipelines-osx.yml

19 changes: 19 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: xtensor-zarr
channels:
- conda-forge
dependencies:
# Build dependencies
- cmake
# Host dependencies
- nlohmann_json
- google-cloud-cpp
- aws-sdk-cpp
- cpp-filesystem
- zlib
- xtensor-io
- zarray
- fsspec
- numpy
- numcodecs
- zarr

0 comments on commit 6acb21c

Please sign in to comment.