Skip to content

Commit

Permalink
# This is a combination of 11 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Add CI for windows

# The commit message mlpack#2 will be skipped:

# correct path

# The commit message mlpack#3 will be skipped:

# spelling error

# The commit message mlpack#4 will be skipped:

# correct path ?

# The commit message mlpack#5 will be skipped:

# debug install protobuf

# The commit message mlpack#6 will be skipped:

# try this may be

# The commit message mlpack#7 will be skipped:

# another attempt to make it work may be

# The commit message mlpack#8 will be skipped:

# retry maybe

# The commit message mlpack#9 will be skipped:

# do we need protoc

# The commit message mlpack#10 will be skipped:

#  add a ,

# The commit message mlpack#11 will be skipped:

# no need of unistd
  • Loading branch information
jeffin143 committed Jul 1, 2020
1 parent 6ed5c32 commit eba8272
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 3 deletions.
19 changes: 18 additions & 1 deletion .ci/.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,21 @@ jobs:
vmImage: macOS-10.14

steps:
- template: macos-steps.yaml
- template: macos-steps.yaml

# Windows build.
- job: WindowsVS15
timeoutInMinutes: 360
displayName: Windows VS15
pool:
vmImage: vs2017-win2016

strategy:
matrix:
Plain:
CMakeArgs-mlpack: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_TESTS=OFF'
CMakeGenerator: '-G "Visual Studio 15 2017 Win64"'
MSBuildVersion: '15.0'

steps:
- template: windows-steps.yaml
163 changes: 163 additions & 0 deletions .ci/windows-steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
steps:
- checkout: self
clean: true
fetchDepth: 1
- task: NuGetToolInstaller@0
inputs:
versionSpec: '5.3.0'

# Fetch build dependencies
- powershell: |
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
nuget install boost -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_unit_test_framework-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_program_options-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_random-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_serialization-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_math_c99-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_filesystem-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_system-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_date_time-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install boost_regex-vc140 -o $(Agent.ToolsDirectory) -Version 1.60.0
nuget install OpenBLAS -o $(Agent.ToolsDirectory)
mkdir -p $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_filesystem-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_system-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_date_time-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
cp $(Agent.ToolsDirectory)/boost_regex-vc140.1.60.0.0/lib/native/address-model-64/lib/*.* $(Agent.ToolsDirectory)/boost_libs
displayName: 'Fetch build dependencies'

# Configure armadillo
- bash: |
git clone --depth 1 https://github.com/mlpack/jenkins-conf.git conf
curl -O http://www.ratml.org/misc/armadillo-8.400.0.tar.gz -o armadillo-8.400.0.tar.gz
tar -xzvf armadillo-8.400.0.tar.gz
cd armadillo-8.400.0/ && cmake $(CMakeGenerator) \
-DBLAS_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
-DLAPACK_LIBRARY:FILEPATH=$(Agent.ToolsDirectory)/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a \
-DCMAKE_PREFIX:FILEPATH=../../armadillo \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release .
displayName: 'Configure armadillo'

# Build armadillo
- task: MSBuild@1
inputs:
solution: 'armadillo-8.400.0/*.sln'
msbuildLocationMethod: 'location'
msbuildVersion: $(MSBuildVersion)
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArguments: /m /p:BuildInParallel=true
clean: false
maximumCpuCount: false
displayName: 'Build armadillo'

# Configure mlpack
- powershell: |
git clone --depth 1 https://github.com/mlpack/mlpack.git
mkdir mlpack\build
cd mlpack\build
cmake $(CMakeGenerator) `
$(CMakeArgs-mlpack) `
-DBLAS_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
-DLAPACK_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
-DARMADILLO_INCLUDE_DIR="..\..\armadillo-8.400.0\include" `
-DARMADILLO_LIBRARY="..\..\armadillo-8.400.0\Release\armadillo.lib" `
-DBOOST_INCLUDEDIR=$(Agent.ToolsDirectory)\boost.1.60.0.0\lib\native\include `
-DBOOST_LIBRARYDIR=$(Agent.ToolsDirectory)\boost_libs `
-DBUILD_JULIA_BINDINGS=OFF `
-DCMAKE_BUILD_TYPE=Release ..
displayName: 'Configure mlpack'

# Build mlpack
- task: MSBuild@1
inputs:
solution: 'mlpack/build/*.sln'
msbuildLocationMethod: 'location'
msbuildVersion: $(MSBuildVersion)
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArguments: /m /p:BuildInParallel=true
maximumCpuCount: false
clean: false
displayName: 'Build mlpack'

# Configure mlpack
- powershell: |
cp $(Agent.ToolsDirectory)\boost_libs\*.* mlpack\build\
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\*.* mlpack\build\
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* mlpack\build\
displayName: 'Configure mlpack'

# Configure protobuf
- bash: |
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
cd cmake
mkdir solution && cd solution
cmake $(CMakeGenerator) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../install ..
displayName: 'Configure protobuf'

# Build protobuf
- task: MSBuild@1
inputs:
solution: 'protobuf/cmake/solution/*.sln'
msbuildLocationMethod: 'location'
msbuildVersion: $(MSBuildVersion)
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArguments: /m /p:BuildInParallel=true
clean: false
maximumCpuCount: false
displayName: 'Build protobuf'

- powershell: |
mkdir build
cp $(Agent.ToolsDirectory)\boost_libs\*.* build\
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\*.* build\
cp $(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.* build\
cd build
cmake $(CMakeGenerator) `
-DBLAS_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
-DLAPACK_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a `
-DARMADILLO_INCLUDE_DIR="..\armadillo-8.400.0\include" `
-DARMADILLO_LIBRARY="..\armadillo-8.400.0\Release\armadillo.lib" `
-DProtobuf_INCLUDE_DIR="..\protobuf\src\" `
-DProtobuf_PROTOC_EXECUTABLE="..\protobuf\cmake\solution\Release\protoc.exe" `
-DPROTOBUF_LIBRARY="..\protobuf\cmake\solution\Release\libprotobuf.lib" `
-DMLPACK_INCLUDE_DIR="..\mlpack\build\include" `
-DMLPACK_LIBRARY="..\mlpack\build\Release\mlpack.lib" `
-DBOOST_INCLUDEDIR=$(Agent.ToolsDirectory)\boost.1.60.0.0\lib\native\include `
-DBOOST_LIBRARYDIR=$(Agent.ToolsDirectory)\boost_libs ..
displayName: 'Configure mlboard'

# Build mlboard
- task: MSBuild@1
inputs:
solution: 'build/*.sln'
msbuildLocationMethod: 'location'
msbuildVersion: $(MSBuildVersion)
configuration: 'Release'
msbuildArchitecture: 'x64'
msbuildArguments: /m /p:BuildInParallel=true
maximumCpuCount: false
clean: false
displayName: 'Build mlboard'

# Run tests via ctest.
- bash: |
cd build
./mlboard_tests
displayName: 'Run tests'
# CTEST_OUTPUT_ON_FAILURE=1 ctest -T Test -C Release .
1 change: 0 additions & 1 deletion tests/filewriter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
#include "catch.hpp"
#include <mlboard/mlboard.hpp>
#include <unistd.h>
#include <sstream>
#include <cstdio>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include <iostream>
#include <mlboard/core.hpp>
#include <unistd.h>
#include <dirent.h>

//#define CATCH_CONFIG_MAIN // catch.hpp will define main().
Expand Down

0 comments on commit eba8272

Please sign in to comment.