From 5814bc6d2e16fa176a341aec265dffbc18740413 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Fri, 27 May 2022 16:14:43 -0400 Subject: [PATCH] Remove Boost from build scripts too. --- .ci/linux-steps.yaml | 10 +-- .ci/macos-steps.yaml | 2 +- .ci/windows-steps.yaml | 4 - .github/workflows/main.yml | 2 +- .github/workflows/update-boost-version.yaml | 81 --------------------- 5 files changed, 3 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/update-boost-version.yaml diff --git a/.ci/linux-steps.yaml b/.ci/linux-steps.yaml index a04e305bc3..be94867ecd 100644 --- a/.ci/linux-steps.yaml +++ b/.ci/linux-steps.yaml @@ -22,15 +22,7 @@ steps: git clone --depth 1 https://github.com/mlpack/jenkins-conf.git conf - sudo add-apt-repository ppa:mhier/libboost-latest - sudo apt-get update - - # Remove BOOST_ROOT from the environment to prevent attempting to use a - # boost which is incompatible with the compiler. - unset BOOST_ROOT - echo "##vso[task.setvariable variable=BOOST_ROOT]"$BOOST_ROOT - - sudo apt-get install -y --allow-unauthenticated libopenblas-dev g++ libboost-all-dev xz-utils + sudo apt-get install -y --allow-unauthenticated libopenblas-dev g++ xz-utils if [ "$(binding)" == "python" ]; then export PYBIN=$(which python) diff --git a/.ci/macos-steps.yaml b/.ci/macos-steps.yaml index ef9a736fac..284e1d4f4b 100644 --- a/.ci/macos-steps.yaml +++ b/.ci/macos-steps.yaml @@ -14,7 +14,7 @@ steps: set -e sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer unset BOOST_ROOT - brew install libomp openblas armadillo boost cereal ensmallen + brew install libomp openblas armadillo cereal ensmallen if [ "$(binding)" == "python" ]; then pip install --upgrade pip diff --git a/.ci/windows-steps.yaml b/.ci/windows-steps.yaml index 361b6861e5..b80299ec93 100644 --- a/.ci/windows-steps.yaml +++ b/.ci/windows-steps.yaml @@ -9,14 +9,12 @@ steps: # Fetch build dependencies - powershell: | nuget install OpenBLAS -o $(Agent.ToolsDirectory) - nuget install boost -o $(Agent.ToolsDirectory) -Version 1.66.0 nuget install unofficial-flayan-cereal -o $(Agent.ToolsDirectory) nuget install ensmallen -o $(Agent.ToolsDirectory) -Version 2.17.0 ## Delete all ensmallen dependencies including armadillo headers, we do not need them here Remove-Item $(Agent.ToolsDirectory)\ensmallen.2.17.0\installed\x64-linux\share -Force -Recurse Remove-Item $(Agent.ToolsDirectory)\ensmallen.2.17.0\installed\x64-linux\include\armadillo_bits -Force -Recurse Remove-Item $(Agent.ToolsDirectory)\ensmallen.2.17.0\installed\x64-linux\include\armadillo -Force - mkdir -p $(Agent.ToolsDirectory)/boost_libs displayName: 'Fetch build dependencies' @@ -59,8 +57,6 @@ steps: -DLAPACK_LIBRARIES:FILEPATH=$(Agent.ToolsDirectory)\OpenBLAS.0.2.14.1\lib\native\lib\x64\libopenblas.dll.a ` -DARMADILLO_INCLUDE_DIR="..\armadillo-9.800.6\tmp\include" ` -DARMADILLO_LIBRARY="..\armadillo-9.800.6\Release\armadillo.lib" ` - -DBOOST_INCLUDEDIR=$(Agent.ToolsDirectory)\boost.1.66.0.0\lib\native\include ` - -DBOOST_LIBRARYDIR=$(Agent.ToolsDirectory)\boost_libs ` -DCEREAL_INCLUDE_DIR=$(Agent.ToolsDirectory)\unofficial-flayan-cereal.1.2.2\build\native\include ` -DENSMALLEN_INCLUDE_DIR=$(Agent.ToolsDirectory)\ensmallen.2.17.0\installed\x64-linux\include ` -DBUILD_JULIA_BINDINGS=OFF ` diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b6d7a7ffb..e3aaa29e9d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: - name: Install Build Dependencies run: | sudo apt-get update - sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost-all-dev libcereal-dev libensmallen-dev libhdf5-dev libarmadillo-dev libcurl4-openssl-dev + sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libcereal-dev libensmallen-dev libhdf5-dev libarmadillo-dev libcurl4-openssl-dev - name: Install R-bindings dependencies run: | diff --git a/.github/workflows/update-boost-version.yaml b/.github/workflows/update-boost-version.yaml deleted file mode 100644 index 1d8c2d26f5..0000000000 --- a/.github/workflows/update-boost-version.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: Update Boost Version -on: - workflow_dispatch: - schedule: - - cron: '0 10 * * *' -jobs: - updateBoostVersion: - if: ${{ github.repository == 'mlpack/mlpack' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install Build Dependencies - run: | - sudo apt-get update - sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost-all-dev libcereal-dev libstb-dev libensmallen-dev - curl -L https://sourceforge.net/projects/arma/files/armadillo-9.800.6.tar.xz | tar -xvJ && cd armadillo* - cmake . && make && sudo make install && cd .. && rm -r armadillo* - - - name: Get Latest Boost Tagged Release - id: boost-version - run: | - # CMake for extracting present boost version. - mkdir build && cd build - cmake .. - - # Ping version information upstream. - BOOST_RELEASE_JSON=$(curl -sL https://api.github.com/repos/boostorg/boost/tags) - FOUND_NEW="NO" - - # Compare present and upstream boost version. - for i in `jq -r .[].name <<< "$BOOST_RELEASE_JSON" | awk '!/.beta/' | \ - grep -Po "(\d+\.)+\d+"` - do - FOUND_SIMILAR="NO" - for j in `grep Boost_ADDITIONAL_VERSIONS_LAST CMakeCache.txt | \ - cut -d "=" -f2 | sed "s/;/ /g"` - do - if [[ "$i" == "$j" ]]; - then - FOUND_SIMILAR="YES" - break - fi - done - if [[ "$FOUND_SIMILAR" != "YES" ]]; - then - FOUND_NEW="YES" - BOOST_VERSION="$BOOST_VERSION\"$i\" " - fi - FOUND_SIMILAR="NO" - for j in `grep Boost_ADDITIONAL_VERSIONS_LAST CMakeCache.txt | \ - cut -d "=" -f2 | sed "s/;/ /g"` - do - if [[ $(echo $i | grep -Po "(\d+)\.\d+") == "$j" ]]; - then - FOUND_SIMILAR="YES" - break - fi - done - if [[ "$FOUND_SIMILAR" != "YES" ]]; - then - FOUND_NEW="YES" - BOOST_VERSION="$BOOST_VERSION\"$(echo $i | grep -Po "(\d+)\.\d+")\" " - fi - done - - # If found the new boost version, then update the CMake script. - if [[ "$FOUND_NEW" == "YES" ]] - then - sed --in-place "s/set(Boost_ADDITIONAL_VERSIONS/set(Boost_ADDITIONAL_VERSIONS\n ${BOOST_VERSION: : -1}/" ../CMakeLists.txt - fi - - - name: Create Pull Request For Boost Version - uses: peter-evans/create-pull-request@v3 - with: - commit-message: Upgrade Boost Version in CMake script. - title: Upgrade Boost Version in CMake script. - body: | - Updates [boostorg/boost](https://github.com/boostorg/boost) in CMake script. - Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request). - labels: update dependencies, automated PR - branch: boost-version-updates