Skip to content

Commit

Permalink
add initial azure pipelines definition
Browse files Browse the repository at this point in the history
test macos build
  • Loading branch information
vigsterkr committed Sep 25, 2018
1 parent ef0e4dc commit 8415c4d
Show file tree
Hide file tree
Showing 8 changed files with 227 additions and 118 deletions.
53 changes: 53 additions & 0 deletions .ci/ci.yml
@@ -0,0 +1,53 @@
jobs:
- job: libshogun
displayName: Linux libshogun

pool:
vmImage: ubuntu-16.04

variables:
testRunTitle: '$(build.sourceBranchName)-debian'
testRunPlatform: debian
imageName: 'shogun/shogun-dev'
ccacheDir: $(build.binariesDirectory)/ccache
ccacheArtifactName: 'ccache-macos'
ccacheArchive: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).tar.xz'

steps:
- template: ./docker-steps.yml

- job: python
displayName: Python Interface
dependsOn: libshogun

pool:
vmImage: ubuntu-16.04

variables:
testRunTitle: '$(build.sourceBranchName)-debian'
testRunPlatform: debian
imageName: 'shogun/shogun-dev'

steps:
- template: ./docker-steps.yml
parameters:
cmakeOptions: 'DINTERFACE_PYTHON=ON'

- job: macOS
displayName: macOS CI Tests

variables:
testRunTitle: '$(build.sourceBranchName)-macos'
testRunPlatform: macos
ccacheDir: $(Agent.HomeDirectory)/.ccache
ccacheArtifactName: 'ccache-macos'

pool:
vmImage: xcode9-macos10.13

steps:
- template: ./macos-steps.yml

- template: ./windows-steps.yml
parameters:
buildConfiguration: Release
73 changes: 73 additions & 0 deletions .ci/docker-steps.yml
@@ -0,0 +1,73 @@
steps:
- checkout: self
clean: true
fetchDepth: 5
submodules: true

- script: mkdir $(ccacheDir)
displayName: Create CCache directory

- task: DownloadBuildArtifacts@0
displayName: 'Download ccache'
inputs:
artifactName: $(ccacheArtifactName)
downloadPath: $(ccacheDir)

- script: |
ls -la $(ccacheDir)
displayName: Debug
condition: always()

- task: docker@0
displayName: Setup
condition: always()
inputs:
action: 'Run an image'
imageName: $(imageName)
volumes: |
$(build.sourcesDirectory):/src
$(build.binariesDirectory):/build
envVars: |
CCACHE_DIR=/build/ccache
workDir: '/build'
containerCommand: 'cmake -DENABLE_TESTING=ON ${{ parameters.cmakeOptions }} /src'
detached: false

- task: docker@0
displayName: Build
inputs:
action: 'Run an image'
imageName: $(imageName)
volumes: |
$(build.sourcesDirectory):/src
$(build.binariesDirectory):/build
envVars: |
CCACHE_DIR=/build/ccache
workDir: '/build'
containerCommand: 'make -s'
detached: false

- task: docker@0
displayName: Test
inputs:
action: 'Run an image'
imageName: $(imageName)
volumes: |
$(build.sourcesDirectory):/src
$(build.binariesDirectory):/build
workDir: '/build'
containerCommand: 'ctest --output-on-failure -j 2'
detached: false

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(ccacheDir)
archiveType: tar
tarCompression: xz
archiveFile: $(ccacheArchive)

- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(ccacheArchive)
artifactName: $(ccacheArtifactName)
publishLocation: 'Container'
35 changes: 35 additions & 0 deletions .ci/macos-steps.yml
@@ -0,0 +1,35 @@
steps:
- checkout: self
clean: true
fetchDepth: 5
submodules: true

- task: DownloadBuildArtifacts@0
displayName: 'Download ccache'
inputs:
artifactName: $(ccacheArtifactName)
downloadPath: $(ccacheDir)

- bash: |
brew update
brew install cmake ccache pkg-config arpack eigen glpk hdf5 json-c lapack lzo nlopt snappy xz
displayName: Install dependencies

- task: CMake@1
displayName: Setup
inputs:
cmakeArgs: -DBUILD_EXAMPLES=OFF -DBUNDLE_JSON=OFF -DBUNDLE_NLOPT=OFF -DENABLE_TESTING=ON -DENABLE_COVERAGE=OFF -DBUILD_META_EXAMPLES=OFF ..

- script: make -j4
displayName: Build
workingDirectory: build

- script: ctest --output-on-failure -j 2
displayName: Test
workingDirectory: build

- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(ccacheDir)
artifactName: $(ccacheArtifactName)
publishLocation: 'Container'
16 changes: 16 additions & 0 deletions .ci/setup_clcache.cmd
@@ -0,0 +1,16 @@
@rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd
@rem The cmd /C hack circumvents a regression where conda installs a conda.bat
@rem script in non-root environments.
set CONDA_INSTALL=cmd /C conda install -q -y
set PIP_INSTALL=pip install -q

@echo on

@rem Use clcache for faster builds
pip install -q git+https://github.com/frerich/clcache.git
clcache -s
set CLCACHE_SERVER=1
set CLCACHE_HARDLINK=1
powershell.exe -Command "Start-Process clcache-server"

if %errorlevel% neq 0 exit /b %errorlevel%
49 changes: 49 additions & 0 deletions .ci/windows-steps.yml
@@ -0,0 +1,49 @@
parameters:
buildConfiguration: Release

jobs:
- job: Windows
displayName: Windows CI Tests
pool:
vmImage: 'vs2017-win2016'

strategy:
matrix:
py36_np14:
CONDA_PY: "36"
CONDA_ENV: shogun

steps:
- checkout: self
clean: true
fetchDepth: 5
submodules: true

- task: CondaEnvironment@1
displayName: Install dependencies
inputs:
createCustomEnvironment: True
environmentName: shogun
packageSpecs: 'python=3.6.* setuptools numpy scipy eigen rxcpp cmake snappy zlib ctags ply ninja mkl-devel jinja2'
createOptions: '-c conda-forge'
updateConda: false

- script: |
.ci\\setup_clcache.cmd
displayName: Setup CLCache
- task: CMake@1
displayName: Setup
inputs:
cmakeArgs: '-G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=${{ parameters.buildConfiguration }} -DBUILD_META_EXAMPLES=OFF -DENABLE_TESTING=ON ..'

- task: VSBuild@1
displayName: Build
inputs:
solution: 'build/shogun.sln'
platform: x64
configuration: ${{ parameters.buildConfiguration }}

- script: ctest -j%NUMBER_OF_PROCESSORS% -C ${{ parameters.buildConfiguration }} -V
displayName: Test
workingDirectory: build
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -13,8 +13,7 @@ Cite Shogun:

Develop branch build status:

[![Build Status](https://travis-ci.org/shogun-toolbox/shogun.svg?branch=develop)](https://travis-ci.org/shogun-toolbox/shogun)
[![Build status](https://ci.appveyor.com/api/projects/status/jx095rnr9qhg8dcv/branch/develop?svg=true)](https://ci.appveyor.com/project/vigsterkr/shogun/branch/develop)
[![Build status](https://dev.azure.com/shogunml/shogun/_apis/build/status/shogun-CI)](https://dev.azure.com/shogunml/shogun/_build/latest?definitionId=-1)
[![codecov](https://codecov.io/gh/shogun-toolbox/shogun/branch/develop/graph/badge.svg)](https://codecov.io/gh/shogun-toolbox/shogun)

Donate to Shogun via NumFocus:
Expand Down
37 changes: 0 additions & 37 deletions appveyor.yml

This file was deleted.

0 comments on commit 8415c4d

Please sign in to comment.