Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add initial azure pipelines definition
test macos build
- Loading branch information
Showing
8 changed files
with
274 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
jobs: | ||
- job: libshogun | ||
displayName: Linux libshogun CI Tests | ||
|
||
pool: | ||
vmImage: ubuntu-16.04 | ||
|
||
variables: | ||
testRunTitle: '$(build.sourceBranchName)-debian' | ||
testRunPlatform: debian | ||
imageName: 'shogun/shogun-dev' | ||
targetPrefix: '$(build.binariesDirectory)/opt' | ||
libshogunArtifactName: 'libshogun' | ||
libshogunArchive: '$(Build.ArtifactStagingDirectory)/libshogun-$(Build.BuildId).tar.xz' | ||
ccacheDir: $(build.binariesDirectory)/ccache | ||
ccacheArtifactName: 'ccache' | ||
ccacheArchive: '$(Build.ArtifactStagingDirectory)/ccache-$(Build.BuildId).tar.xz' | ||
|
||
steps: | ||
- template: ./docker-steps.yml | ||
|
||
- job: python | ||
displayName: Python Interface CI Tests | ||
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: '-DLIBSHOGUN=OFF -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchDepth: 5 | ||
submodules: true | ||
|
||
- script: mkdir $(ccacheDir) $(targetPrefix) | ||
condition: | ||
displayName: Create CCache directory | ||
|
||
#- task: DownloadBuildArtifacts@0 | ||
# displayName: 'Download ccache' | ||
# inputs: | ||
# artifactName: $(ccacheArtifactName) | ||
# downloadPath: $(ccacheDir) | ||
|
||
- ${{ if ne(parameters.cmakeOptions, '') }}: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download libshogun' | ||
inputs: | ||
artifactName: $(libshogunArtifactName) | ||
downloadPath: $(targetPrefix) | ||
|
||
- task: ExtractFiles@1 | ||
displayName: 'Extract libshogun archive' | ||
inputs: | ||
archiveFilePatterns: '$(targetPrefix)/*.tar.xz' | ||
destinationFolder: $(targetPrefix) | ||
cleanDestinationFolder: True | ||
|
||
- script: | | ||
ls -la $(targetPrefix) | ||
displayName: Debug | ||
|
||
- task: docker@0 | ||
displayName: Setup | ||
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 }} -DCMAKE_INSTALL_PREFIX=$(targetPrefix) /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: Install | ||
inputs: | ||
action: 'Run an image' | ||
imageName: $(imageName) | ||
volumes: | | ||
$(build.sourcesDirectory):/src | ||
$(build.binariesDirectory):/build | ||
workDir: '/build' | ||
containerCommand: 'make install' | ||
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 | ||
|
||
- ${{ if eq(parameters.cmakeOptions, '') }}: | ||
- task: ArchiveFiles@2 | ||
displayName: 'Archive LibShogun' | ||
inputs: | ||
rootFolderOrFile: $(targetPrefix) | ||
archiveType: tar | ||
tarCompression: xz | ||
archiveFile: $(libshogunArchive) | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish LibShogun archive' | ||
inputs: | ||
pathtoPublish: $(libshogunArchive) | ||
artifactName: $(libshogunArtifactName) | ||
publishLocation: 'Container' | ||
|
||
- task: ArchiveFiles@2 | ||
displayName: 'Archive CCache' | ||
inputs: | ||
rootFolderOrFile: $(ccacheDir) | ||
archiveType: tar | ||
tarCompression: xz | ||
archiveFile: $(ccacheArchive) | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish CCache archive' | ||
inputs: | ||
pathtoPublish: $(ccacheArchive) | ||
artifactName: $(ccacheArtifactName) | ||
publishLocation: 'Container' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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 | ||
condition: always() | ||
|
||
- 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.