Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .azure-pipelines/azure-pipelines-linux-clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
jobs:
- job: 'Linux_0'
strategy:
matrix:
clang_4:
llvm_version: '4.0'
clang_5:
llvm_version: '5.0'
clang_6:
llvm_version: '6.0'
clang_7:
llvm_version: '7'
clang_8:
llvm_version: '8'
clang_9:
llvm_version: '9'
pool:
vmImage: ubuntu-16.04
variables:
CC: clang-$(llvm_version)
CXX: clang++-$(llvm_version)
timeoutInMinutes: 360
steps:

- script: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
if [[ $(llvm_version) == '4.0' || $(llvm_version) == '5.0' ]]; then
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install gcc-4.9 clang-$(llvm_version)
else
LLVM_VERSION=$(llvm_version)
get -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$LLVM_VERSION main"
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install clang-$(llvm_version)
fi
displayName: Install build toolchain

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

- template: unix-build.yml
37 changes: 37 additions & 0 deletions .azure-pipelines/azure-pipelines-linux-gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
jobs:
- job: 'Linux_1'
strategy:
matrix:
gcc_4:
gcc_version: '4.9'
gcc_5:
gcc_version: '5'
gcc_6:
gcc_version: '6'
gcc_7:
gcc_version: '7'
gcc_8:
gcc_version: '8'
gcc_9:
gcc_version: '9'
pool:
vmImage: ubuntu-16.04
variables:
CC: gcc-$(gcc_version)
CXX: g++-$(gcc_version)
timeoutInMinutes: 360
steps:

- script: |
if [[ $(gcc_version) == '4.9' || $(gcc_version) == '6' ]]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install g++-$(gcc_version)
fi
displayName: Install build toolchain

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

- template: unix-build.yml

28 changes: 28 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
jobs:
- job: 'OSX'
strategy:
matrix:
macOS_10_14:
image_name: 'macOS-10.14'
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"
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
chmod +x ~/uninstall_homebrew
~/uninstall_homebrew -f -q
displayName: Remove homebrew

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

- template: unix-build.yml
34 changes: 34 additions & 0 deletions .azure-pipelines/unix-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
steps:
- script: |
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda env create --file environment-dev.yml
source activate xtensor-python
displayName: Install dependencies

- script: |
source activate xtensor-python
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DPYTHON_EXECUTABLE=`which python` -DDOWNLOAD_GTEST=ON $(Build.SourcesDirectory)
displayName: Configure xtensor-python
workingDirectory: $(Build.BinariesDirectory)

- script: |
source activate xtensor-python
make -j2 test_xtensor_python
displayName: Build xtensor-python
workingDirectory: $(Build.BinariesDirectory)/build

- script: |
source activate xtensor-python
cd test
./test_xtensor_python
displayName: Test xtensor-python (C++)
workingDirectory: $(Build.BinariesDirectory)/build/test

- script: |
source activate xtensor-python
py.test -s
displayName: Test xtensor-python (Python)
workingDirectory: $(Build.BinariesDirectory)/build
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
trigger:
- master

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

13 changes: 13 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: xtensor-python
channels:
- conda-forge
dependencies:
# Build dependencies
- cmake
# Host dependencies
- xtensor=0.21.4
- numpy
- pybind11=2.4.3
# Test dependencies
- pytest