Skip to content

Commit

Permalink
Use newer boost version
Browse files Browse the repository at this point in the history
1.81.0 contains unordered flat structures. Also have to compile from
source again.
  • Loading branch information
BUYT-1 committed Aug 17, 2024
1 parent 3e3c499 commit c99be39
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 23 deletions.
39 changes: 35 additions & 4 deletions .github/composite-actions/download-libraries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ inputs:
description: 'Download googletest'
default: true

install-boost:
type: boolean
description: 'Install boost'
default: true

runs:
using: 'composite'
steps:
Expand All @@ -21,10 +26,6 @@ runs:
sudo apt-get install gcc-10 g++-10 cmake build-essential -y
shell: bash

- name: Install Boost
run: sudo apt-get install libboost-all-dev -y
shell: bash

- name: Make lib directory
run: |
mkdir -p lib
Expand Down Expand Up @@ -66,6 +67,36 @@ runs:
directory: atomicbitvector
download-command: git clone https://github.com/ekg/atomicbitvector.git --depth 1

- name: Cache Boost
uses: actions/cache@v3
id: cache-boost
with:
path: ${{github.workspace}}/lib/boost_1_81_0
key: ${{ runner.os }}-boost-81

- name: Download and unpack Boost
run: |
cd lib
wget -O boost_1_81_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.81.0/boost_1_81_0.tar.gz/download
tar xzvf boost_1_81_0.tar.gz
shell: bash
if: steps.cache-boost.outputs.cache-hit != 'true'

- name: Copy boost
run: |
cd lib
# Avoid caching build files
cp -r boost_1_81_0 boost
shell: bash

- name: Install Boost
run: |
cd lib/boost
./bootstrap.sh --prefix=/usr
sudo ./b2 install --prefix=/usr
shell: bash
if: inputs.install-boost != 'false'

# Uncomment this if we set up our own git lfs server
# - name: Install git-lfs
# run: |
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,17 @@ jobs:
with:
download-pybind: true
download-googletest: false

- name: Cache unpacked Boost
uses: actions/cache@v3
id: cache-unpacked-boost
with:
path: ${{github.workspace}}/lib/boost_1_78_0
key: ${{ runner.os }}-boost-for-wheels-78

- name: Download & unpack Boost
run: |
cd ${{github.workspace}}/lib
wget -O boost_1_78_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.78.0/boost_1_78_0.tar.gz/download
tar xzf boost_1_78_0.tar.gz
shell: bash
if: steps.cache-unpacked-boost.outputs.cache-hit != 'true'
install-boost: false

- name: Build wheels
uses: pypa/[email protected]
with:
only: ${{ matrix.only }}
env:
CIBW_BEFORE_ALL: >
cd lib/boost_1_78_0 &&
./bootstrap.sh --prefix=/usr/local &&
./b2 install -j4 --prefix=/usr/local
cd lib/boost &&
./bootstrap.sh --prefix=/usr &&
./b2 install -j4 --prefix=/usr
CIBW_TEST_COMMAND: >
cp {project}/test_input_data/WDC_satellites.csv {project}/src/python_bindings &&
cp {project}/test_input_data/transactional_data/rules-kaggle-rows.csv {project}/src/python_bindings &&
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ endif()

# configuring boost
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost 1.72.0 REQUIRED COMPONENTS container thread graph)
find_package(Boost 1.81.0 REQUIRED COMPONENTS container thread graph)
include_directories(${Boost_INCLUDE_DIRS})
message(${Boost_INCLUDE_DIRS})

Expand Down

0 comments on commit c99be39

Please sign in to comment.