forked from mlpack/mlpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacos-steps.yaml
66 lines (56 loc) · 1.64 KB
/
macos-steps.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
steps:
# Checkout repository
- checkout: self
clean: true
fetchDepth: 1
# Set python version.
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
# Install Build Dependencies
- script: |
set -e
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
brew install libomp openblas armadillo cereal ensmallen
if [ "$(binding)" == "python" ]; then
pip install --upgrade pip
pip install cython numpy pandas zipp configparser wheel
fi
if [ "a$(julia.version)" != "a" ]; then
brew install --cask julia
fi
displayName: 'Install Build Dependencies'
# Configure mlpack (CMake)
- script: |
mkdir build && cd build
if [ "$(binding)" == "go" ]; then
export GOPATH=$PWD/src/mlpack/bindings/go
export GO111MODULE=off
go get -u -t gonum.org/v1/gonum/...
fi
if [ "$(binding)" == "python" ]; then
export PYPATH=$(which python)
cmake $(CMakeArgs) -DPYTHON_EXECUTABLE=$PYPATH ..
else
cmake $(CMakeArgs) ..
fi
displayName: 'CMake'
# Build mlpack
- script: cd build && make -j2
displayName: 'Build'
# Run tests via ctest.
- script: cd build && CTEST_OUTPUT_ON_FAILURE=1 ctest -T Test .
displayName: 'Run tests via ctest'
# Publish test results to Azure Pipelines
- task: PublishTestResults@2
inputs:
testResultsFormat: cTest
testResultsFiles: build/Testing/*/Test.xml
failTaskOnFailedTests: true
displayName: 'Publish tests'
# Publish build artifacts to Azure Pipelines
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'build/Testing/'
artifactName: 'Tests'
displayName: 'Publish artifacts test results'