Skip to content

Commit

Permalink
add Linux/Conda build
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Feb 3, 2020
1 parent 24bd234 commit 3cf94bf
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
jobs:
- template: ./scripts/azp/linux.yml
- template: ./scripts/azp/linux-conda.yml
- template: ./scripts/azp/win.yml
- template: ./scripts/azp/osx.yml
82 changes: 82 additions & 0 deletions scripts/azp/linux-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# -*- mode: yaml -*-

jobs:
- job: linux-conda
pool:
vmImage: ubuntu-16.04
container:
image: continuumio/miniconda
options: --privileged
timeoutInMinutes: 60
steps:
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
displayName: Add conda to PATH
- script: |
ECHO ON
source activate base
conda create --yes --quiet --name pdal
displayName: Create conda environment
- script: |
ECHO ON
source activate pdal
conda config --set always_yes True --set show_channel_urls True
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install --yes --quiet --name pdal conda-build ninja conda-forge-ci-setup=2 -y
conda install --yes --quiet --name pdal -c conda-forge pdal --only-deps -y
displayName: Install PDAL dependencies
- script: |
source activate pdal
echo "current directory:" `pwd`
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_LIBRARY_PATH:FILEPATH="$CONDA_PREFIX/lib" \
-DCMAKE_INCLUDE_PATH:FILEPATH="$CONDA_PREFIX/include" \
-DCMAKE_FIND_FRAMEWORK="NEVER" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
-DBUILD_PLUGIN_NITF=ON \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_TILEDB=ON \
-DBUILD_PGPOINTCLOUD_TESTS=OFF \
-DWITH_LAZPERF=ON \
-DWITH_ZSTD=ON \
-DWITH_LASZIP=ON \
..
displayName: 'CMake'
- script: |
cd build
source activate pdal
ninja
displayName: 'Build'
- script: |
cd build
export PDAL_DRIVER_PATH=`pwd`/lib
source activate pdal
ctest -V
displayName: 'Test'
- script: |
export PDAL_TEST_DIR=`pwd`/test
cd build
source activate pdal
ls build/lib/*
ninja install
displayName: 'Install'
- script: |
export BASE=`pwd`
source activate pdal
for EXAMPLE in writing writing-filter writing-kernel writing-reader writing-writer
do
cd $BASE/examples/$EXAMPLE
mkdir -p _build || exit 1
cd _build || exit 1
cmake -G "Ninja" .. -DPDAL_DIR=$CONDA_PREFIX/lib/cmake/PDAL && ninja
done
displayName: 'Examples'

0 comments on commit 3cf94bf

Please sign in to comment.