Skip to content

Commit

Permalink
Merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffin143 committed Feb 21, 2021
2 parents 733db6a + 9b91a08 commit f36c858
Show file tree
Hide file tree
Showing 1,159 changed files with 86,497 additions and 31,591 deletions.
77 changes: 20 additions & 57 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
clone_depth: 10

environment:
BOOST_PROG_OPTION : "C:/projects/mlpack/\
boost_program_options-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_MATH : "C:/projects/mlpack/\
boost_math_c99-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_RANDOM : "C:/projects/mlpack/\
boost_random-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_SERIALIZATION : "C:/projects/mlpack/\
boost_serialization-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
BOOST_UNIT_TEST : "C:/projects/mlpack/\
boost_unit_test_framework-vc140.1.60.0.0/lib/native/address-model-64/lib/*.*"
ARMADILLO_DOWNLOAD : "http://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz"
ARMADILLO_DOWNLOAD : "https://data.kurg.org/armadillo-8.400.0.tar.xz"
ARMADILLO_LIBRARY : "C:/projects/mlpack/armadillo-8.400.0/\
build/Debug/armadillo.lib"
BLAS_LIBRARY : "%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/\
Expand All @@ -22,50 +16,36 @@ environment:
JENKINS_DOC : "C:/projects/mlpack/dist/win-installer/jenkinsdoc.zip"
GIT_VERSION_FILE : "C:/projects/mlpack/src/mlpack/core/util/gitversion.hpp"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VSVER: Visual Studio 14 2015 Win64
MSBUILD: C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VSVER: Visual Studio 15 2017 Win64
MSBUILD: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
# Currently, the VS2019 build seems to always time out. This seems to be an
# AppVeyor issue.
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# VSVER: Visual Studio 16 2019
# MSBUILD: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VSVER: Visual Studio 16 2019
MSBUILD: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe

# We have removed the VS studio 15 2017 build since it is not possible to complete
# or finish the build due to the `compiler out of heap space issues`.
# Therefore, in the meanwhile, we are only doing the installation for VS 16 2019.

configuration: Release

os: Visual Studio 2015
os: Visual Studio 2019

install:
- ps: nuget install boost -o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_unit_test_framework-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_program_options-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_random-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_serialization-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install boost_math_c99-vc140
-o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0
- ps: >
nuget install unofficial-flayan-cereal
-o "${env:APPVEYOR_BUILD_FOLDER}"
- ps: nuget install OpenBLAS -o "${env:APPVEYOR_BUILD_FOLDER}"
- set path=C:\Program Files (x86)\WiX Toolset v3.11\bin;%path%

build_script:
- mkdir boost_libs
- ps: cp ${env:BOOST_PROG_OPTION} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_MATH} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_RANDOM} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_SERIALIZATION} C:\projects\mlpack\boost_libs\
- ps: cp ${env:BOOST_UNIT_TEST} C:\projects\mlpack\boost_libs\
- echo TEST_ARMA is %ARMADILLO_DOWNLOAD%
- >
appveyor DownloadFile %ARMADILLO_DOWNLOAD%
Expand All @@ -89,17 +69,20 @@ build_script:
-DLAPACK_LIBRARIES:FILEPATH=%BLAS_LIBRARY%
-DARMADILLO_INCLUDE_DIR="C:/projects/mlpack/armadillo-8.400.0/include"
-DARMADILLO_LIBRARY:FILEPATH=%ARMADILLO_LIBRARY%
-DCEREAL_INCLUDE_DIR="C:/projects/mlpack/unofficial-flayan-cereal.1.2.2/build/native/include"
-DBOOST_INCLUDEDIR:PATH=%BOOST_INCLUDE%
-DBOOST_LIBRARYDIR:PATH="C:/projects/mlpack/boost_libs"
-DDEBUG=OFF
-DPROFILE=OFF
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_GO_BINDINGS=OFF
-DBUILD_R_BINDINGS=OFF
-DBUILD_TESTS=OFF
-DCMAKE_BUILD_TYPE=Release ..
- >
"%MSBUILD%" "C:\projects\mlpack\build\mlpack.sln"
/m /verbosity:minimal /nologo /p:BuildInParallel=true
/p:Configuration=Release;Platform=x64
# Zip Artifacts.
- >
7z a mlpack-windows-no-libs.zip
Expand All @@ -108,7 +91,7 @@ build_script:
7z a mlpack-windows.zip
"%APPVEYOR_BUILD_FOLDER%\build\Release\*.*"
"%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/*.*"
# Pulling documentation for the installer.
- ps: >
try{(new-object net.webclient).DownloadFile(${env:JENKINS_DOC_DOWNLOAD},
Expand All @@ -119,7 +102,7 @@ build_script:
[System.IO.Compression.ZipFile]::ExtractToDirectory(${env:JENKINS_DOC},
'C:\projects\mlpack\dist\win-installer\staging\doc')}
catch{Write-Output "Unable to add doc to installer, skipping!"}
# Preparing installer staging.
- cd C:\projects\mlpack\dist\win-installer\staging && mkdir lib
- ps: >
Expand All @@ -137,9 +120,6 @@ build_script:
- ps: >
cp C:\projects\mlpack\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.dll
C:\projects\mlpack\dist\win-installer\staging\
- ps: >
cp C:\projects\mlpack\boost_libs\boost_unit_test_framework-vc*.dll
C:\projects\mlpack\dist\win-installer\staging\
- ps: >
cp C:\projects\mlpack\build\include\mlpack
C:\projects\mlpack\dist\win-installer\staging -recurse
Expand All @@ -149,7 +129,7 @@ build_script:
- ps: >
cp C:\projects\mlpack\src\mlpack\tests\data\german.csv
C:\projects\mlpack\dist\win-installer\staging\examples\sample-ml-app\sample-ml-app\data\
# Checking current gitversion or mlpack version.
- ps: >
$ver = (Get-Content
Expand Down Expand Up @@ -221,7 +201,7 @@ build_script:
artifacts:
- path: 'build\*.zip'
name: mlpack-windows-zip

- path: 'dist\win-installer\mlpack-win-installer\bin\x64\Release\*.msi'
name: mlpack-windows-installer

Expand All @@ -237,20 +217,3 @@ cache:
- packages -> **\packages.config
- armadillo.tar.xz -> appveyor.yaml

test_script:
# Copy all DLLs into the right place before running the test.
- ps: cp C:\projects\mlpack\boost_libs\*.* C:\projects\mlpack\build\
- ps: >
cp C:\projects\mlpack\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.*
C:\projects\mlpack\build\
- cd "%APPVEYOR_BUILD_FOLDER%/build/"
- >
Release\mlpack_test.exe
--report_level=detailed
--log_level=test_suite --log_format=XML > mlpack_test.xml & exit 0
# Attempt to upload results to AppVeyor.
- ps: >
$wc = New-Object 'System.Net.WebClient';
$wc.UploadFile(
"https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)",
(Resolve-Path .\mlpack_test.xml));
58 changes: 22 additions & 36 deletions .ci/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,49 @@ jobs:
strategy:
matrix:
Plain:
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF'
python.version: '2.7'
Python27:
python.version: '2.7'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DPYTHON_EXECUTABLE=/usr/bin/python'
Python37:
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'
Python:
binding: 'python'
python.version: '3.7'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_GO_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'
Julia:
python.version: '2.7'
julia.version: '1.3.0'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=ON -DJULIA_EXECUTABLE=/opt/julia-1.3.0/bin/julia'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=ON -DBUILD_GO_BINDINGS=OFF -DJULIA_EXECUTABLE=/opt/julia-1.3.0/bin/julia -DBUILD_R_BINDINGS=OFF'
Go:
binding: 'go'
go.version: '1.11.0'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=ON -DBUILD_R_BINDINGS=OFF'
Markdown:
python.version: '2.7'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_MARKDOWN_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_MARKDOWN_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'

steps:
- template: linux-steps.yaml

- job: macOS
timeoutInMinutes: 360
pool:
vmImage: macOS-10.14
vmImage: macOS-latest
strategy:
matrix:
Plain:
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF'
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'
python.version: '2.7'
Python37:
Python:
binding: 'python'
python.version: '3.7'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF'
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=ON -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'
Julia:
python.version: '2.7'
julia.version: '1.3.0'
CMakeArgs: '-DDEBUG=OFF -DPROFILE=OFF -DBUILD_JULIA_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF'

steps:
- template: macos-steps.yaml

- job: WindowsVS15
timeoutInMinutes: 360
displayName: Windows VS15
pool:
vmImage: vs2017-win2016
strategy:
matrix:
Plain:
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF'
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_JULIA_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'
Go:
binding: 'go'
python.version: '2.7'
CMakeGenerator: '-G "Visual Studio 15 2017 Win64"'
MSBuildVersion: '15.0'
ArchiveNoLibs: 'mlpack-windows-vs15-no-libs.zip'
ArchiveLibs: 'mlpack-windows-vs15.zip'
ArchiveTests: 'mlpack_test-vs15.xml'
go.version: '1.11.0'
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=ON -DBUILD_R_BINDINGS=OFF'

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

- job: WindowsVS16
timeoutInMinutes: 360
Expand All @@ -81,7 +67,7 @@ jobs:
strategy:
matrix:
Plain:
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF'
CMakeArgs: '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF'
python.version: '2.7'
CMakeGenerator: '-G "Visual Studio 16 2019"'
MSBuildVersion: '16.0'
Expand Down
39 changes: 23 additions & 16 deletions .ci/linux-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:
# Set python version
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
versionSpec: '3.7'

# Install build dependencies
- script: |
Expand All @@ -21,41 +21,48 @@ steps:
unset BOOST_ROOT
echo "##vso[task.setvariable variable=BOOST_ROOT]"$BOOST_ROOT
sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost1.70-dev libarmadillo-dev xz-utils
sudo apt-get install -y --allow-unauthenticated libopenblas-dev g++ libboost1.70-dev xz-utils
if [ '$(python.version)' == '2.7' ]; then
sudo apt-get install -y --allow-unauthenticated python-pip cython python-numpy python-pandas
sudo pip install --upgrade --ignore-installed setuptools cython
sudo pip install "zipp<3.1"
if [ "$(binding)" == "python" ]; then
export PYBIN=$(which python)
$PYBIN -m pip install --upgrade pip
$PYBIN -m pip install --upgrade --ignore-installed setuptools cython pandas
fi
if [ '$(python.version)' == '3.7' ]; then
sudo apt-get install -y --allow-unauthenticated python3-pip cython3 python3-numpy
sudo pip3 install --upgrade --ignore-installed setuptools cython pandas
fi
if [ 'a$(julia.version)' != 'a' ]; then
if [ "a$(julia.version)" != "a" ]; then
wget https://julialang-s3.julialang.org/bin/linux/x64/1.3/julia-1.3.0-linux-x86_64.tar.gz
sudo tar -C /opt/ -xvpf julia-1.3.0-linux-x86_64.tar.gz
fi
# Install armadillo.
curl https://ftp.fau.de/macports/distfiles/armadillo/armadillo-8.400.0.tar.xz | tar -xvJ && cd armadillo*
curl https://data.kurg.org/armadillo-8.400.0.tar.xz | tar -xvJ && cd armadillo*
cmake . && make && sudo make install && cd ..
# Install cereal.
wget https://github.com/USCiLab/cereal/archive/v1.3.0.tar.gz
tar -xvzpf v1.3.0.tar.gz # Unpack into cereal-1.3.0/.
cd cereal-1.3.0/
displayName: 'Install Build Dependencies'

# Configure mlpack (CMake)
- script: unset BOOST_ROOT && mkdir build && cd build && cmake $(CMakeArgs) ..
- script: |
unset BOOST_ROOT
mkdir build && cd build
if [ "$(binding)" == "go" ]; then
export GOPATH=$PWD/src/mlpack/bindings/go
go get -u -t gonum.org/v1/gonum/...
fi
cmake $(CMakeArgs) -DPYTHON_EXECUTABLE=`which python` -DCEREAL_INCLUDE_DIR=../cereal-1.3.0/include/ ..
displayName: 'CMake'

# Build mlpack
- script: cd build && make
condition: eq(variables['CMakeArgs'], '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF')
condition: eq(variables['CMakeArgs'], '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF')
displayName: 'Build'

# Build mlpack
- script: cd build && make -j2
condition: ne(variables['CMakeArgs'], '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF')
condition: ne(variables['CMakeArgs'], '-DDEBUG=ON -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JULIA_BINDINGS=OFF -DBUILD_GO_BINDINGS=OFF -DBUILD_R_BINDINGS=OFF')
displayName: 'Build'

# Run tests via ctest.
Expand Down
24 changes: 18 additions & 6 deletions .ci/macos-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ steps:
# Install Build Dependencies
- script: |
set -e
sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_12.2.app/Contents/Developer
unset BOOST_ROOT
pip install cython numpy pandas zipp configparser
brew install openblas armadillo boost
brew install openblas armadillo boost cereal
if [ "$(binding)" == "python" ]; then
pip install --upgrade pip
pip install cython numpy pandas zipp configparser
fi
if [ "a$(julia.version)" != "a" ]; then
brew cask install julia
brew install --cask julia
fi
git clone --depth 1 https://github.com/mlpack/jenkins-conf.git conf
Expand All @@ -28,8 +32,16 @@ steps:
- script: |
unset BOOST_ROOT
mkdir build && cd build
export PYPATH=$(which python)
cmake $(CMakeArgs) -DPYTHON_EXECUTABLE=$PYPATH ..
if [ "$(binding)" == "go" ]; then
export GOPATH=$PWD/src/mlpack/bindings/go
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
Expand Down

0 comments on commit f36c858

Please sign in to comment.