Skip to content

Commit

Permalink
add osx builder
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Mar 2, 2020
1 parent c961dc6 commit 21a8103
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions .azure-pipelines.yml
@@ -1,3 +1,4 @@
jobs:
- template: ./scripts/azp/linux.yml
- template: ./scripts/azp/win.yml
- template: ./scripts/azp/osx.yml
62 changes: 62 additions & 0 deletions scripts/azp/osx.yml
@@ -0,0 +1,62 @@
# -*- mode: yaml -*-

jobs:
- job: osx
pool:
vmImage: macOS-10.14
steps:
- script: |
echo "Removing homebrew from Azure to avoid conflicts."
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
chmod +x ~/uninstall_homebrew
~/uninstall_homebrew -fq
rm ~/uninstall_homebrew
displayName: Remove homebrew
- 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 proj
displayName: Create conda environment
- script: |
ECHO ON
source activate proj
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 proj curl cmake ninja libtiff sqlite conda-build ninja conda-forge-ci-setup=2 -y
displayName: Install PROJ dependencies
- script: |
source activate proj
export CI=azure
source run_conda_forge_build_setup
env: {
OSX_FORCE_SDK_DOWNLOAD: "1"
}
displayName: Configure OSX SDK
- script: |
source activate proj
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" \
..
displayName: 'CMake'
- script: |
cd build
source activate proj
ninja
displayName: 'Build'
- script: |
cd build
source activate proj
ctest -V
2 changes: 2 additions & 0 deletions scripts/azp/win.yml
Expand Up @@ -32,6 +32,8 @@ jobs:
cmake -G "Ninja" ^
-DCMAKE_LIBRARY_PATH:FILEPATH="%CONDA_PREFIX%/Library/lib" ^
-DCMAKE_INCLUDE_PATH:FILEPATH="%CONDA_PREFIX%/Library/include" ^
-DCMAKE_C_FLAGS="/WX" \
-DCMAKE_CXX_FLAGS="/WX"
..
displayName: 'CMake'
- script: |
Expand Down

0 comments on commit 21a8103

Please sign in to comment.