Skip to content

Commit

Permalink
[2.8] Fix boost installation (#4552)
Browse files Browse the repository at this point in the history
* add boost installation to benchmark flow

(cherry picked from commit d2acd6e)

* remove sudo

(cherry picked from commit 0e8456c)

* run circleci

(cherry picked from commit a03ca90)

* identation?

(cherry picked from commit ec67308)

* fix wroking dir

(cherry picked from commit 9b0f28c)

* try export to bashrc

(cherry picked from commit 2f2f5f6)

* identation

(cherry picked from commit 825b2db)

* remove specifci boost on mac from makefile

(cherry picked from commit 04d2a2e)

* try find package

(cherry picked from commit 91aceeb)

* try path

(cherry picked from commit a248683)

* don't try to install boost, try download

(cherry picked from commit 3cb9dc1)

* fix BOOST_DIR

(cherry picked from commit 9e62fec)

* try diffrent path

(cherry picked from commit 529407b)

* rerun circle,
run macos GHA

(cherry picked from commit 69bd9a1)

* define BOOST_DIR default value

remove cahcaing boost from GHA

(cherry picked from commit b385533)

* config.yml and flow-temp cleanup

(cherry picked from commit 7042288)

* update git ignore

update comment in Makefile

(cherry picked from commit 9fd106e)

* revert change in Makefile

(cherry picked from commit b32392c)

---------

Co-authored-by: meiravgri <meirav.grimberg@redis.com>
  • Loading branch information
github-actions[bot] and meiravgri committed Mar 25, 2024
1 parent b75521d commit c1535c6
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 61 deletions.
21 changes: 13 additions & 8 deletions .circleci/config.yml
Expand Up @@ -156,10 +156,12 @@ commands:
redis_version: <<parameters.redis_version>>
getredis_params: <<parameters.getredis_params>>
- run:
name: Prepare Conan dependencies
name: Install boost
shell: /bin/bash -l -eo pipefail
working_directory: .install
command: |
make conan <<parameters.build_params>> SHOW=1 NPROC=16
./install_boost.sh $BOOST_VERSION
- run:
name: Build (Search)
shell: /bin/bash -l -eo pipefail
Expand Down Expand Up @@ -884,10 +886,11 @@ jobs:
- checkout-all
- install-prerequisites
- run:
name: Prepare Conan dependencies
name: Install boost
shell: /bin/bash -l -eo pipefail
working_directory: .install
command: |
make conan SHOW=1 NPROC=16
./install_boost.sh $BOOST_VERSION
- run:
name: Build & Test
shell: /bin/bash -l -eo pipefail
Expand All @@ -912,10 +915,11 @@ jobs:
- checkout-all
- install-prerequisites
- run:
name: Prepare Conan dependencies
name: Install boost
shell: /bin/bash -l -eo pipefail
working_directory: .install
command: |
make conan SAN=<<parameters.san-type>> SHOW=1
./install_boost.sh $BOOST_VERSION
- run:
name: Build & test (Search)
shell: /bin/bash -l -eo pipefail
Expand All @@ -942,10 +946,11 @@ jobs:
- early-returns
- checkout-all
- run:
name: Prepare Conan dependencies
name: Install boost
shell: /bin/bash -l -eo pipefail
working_directory: .install
command: |
make conan VG=1 SHOW=1 NPROC=16
./install_boost.sh $BOOST_VERSION
- run:
name: Build & Test
shell: /bin/bash -l -eo pipefail
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/benchmark-flow.yml
Expand Up @@ -32,6 +32,8 @@ on:
benchmark_runner_group_total:
type: number
default: 1
env:
BOOST_VERSION: ${{ vars.BOOST_VERSION }}

jobs:
benchmark-steps:
Expand All @@ -46,6 +48,12 @@ jobs:
run: ./sbin/setup
- name: Git Config
run: git config --global --add safe.directory '*'


- name: Install Boost
working-directory: .install
run: ./install_boost.sh ${{ env.BOOST_VERSION }}

- name: Get Redis
uses: actions/checkout@v4
with:
Expand All @@ -56,7 +64,7 @@ jobs:
working-directory: redis
run: make install
- name: Build RediSearch
run: make conan build
run: make build
COORD=${{ inputs.cluster_env }}
PROFILE=${{ inputs.profile_env }}
REDISEARCH_MT_BUILD=0
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/flow-coverage.yml
Expand Up @@ -26,22 +26,10 @@ jobs:
- name: Setup common
run: .install/common_installations.sh sudo

- name: Restore Boost
id: restore-boost
uses: actions/cache@v3
with:
path: .install/boost
key: boost-${{ env.BOOST_VERSION }}-ubuntu-latest-${{ runner.arch }}

- name: Install Boost
if: steps.restore-boost.outputs.cache-hit != 'true'
working-directory: .install
run: ./install_boost.sh ${{ env.BOOST_VERSION }} sudo

- name: Define BOOST_DIR
working-directory: .install/boost
run: echo "BOOST_DIR=$PWD" >> $GITHUB_ENV

- name: Get Redis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/task-build-artifacts.yml
Expand Up @@ -72,22 +72,10 @@ jobs:
- name: install build artifacts req
run: pip install -q -r .install/build_package_requirments.txt

- name: Restore Boost
id: restore-boost
uses: actions/cache@v3
with:
path: .install/boost
key: boost-${{ env.BOOST_VERSION }}-${{ inputs.container || inputs.env }}-${{ runner.arch }}

- name: Install Boost
if: steps.restore-boost.outputs.cache-hit != 'true'
working-directory: .install
run: ./install_boost.sh ${{ env.BOOST_VERSION }} ${{ steps.mode.outputs.mode }}

- name: Define BOOST_DIR
working-directory: .install/boost
run: echo "BOOST_DIR=$PWD" >> $GITHUB_ENV

# Get Redis
- name: Get Redis
uses: actions/checkout@v3
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/task-test.yml
Expand Up @@ -68,22 +68,10 @@ jobs:
- name: Setup common
run: .install/common_installations.sh ${{ steps.mode.outputs.mode }}

- name: Restore Boost
id: restore-boost
uses: actions/cache@v3
with:
path: .install/boost
key: boost-${{ env.BOOST_VERSION }}-${{ inputs.container || inputs.env }}-${{ runner.arch }}

- name: Install Boost
if: steps.restore-boost.outputs.cache-hit != 'true'
working-directory: .install
run: ./install_boost.sh ${{ env.BOOST_VERSION }} ${{ steps.mode.outputs.mode }}

- name: Define BOOST_DIR
working-directory: .install/boost
run: echo "BOOST_DIR=$PWD" >> $GITHUB_ENV

- name: Get Redis
if: inputs.get-redis != 'skip getting redis'
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,3 +26,4 @@ callgrind.out.*
/tests/pytests/logs/
/deps/RedisJSON/
/1/
/.install/boost*
4 changes: 0 additions & 4 deletions .install/install_boost.sh
Expand Up @@ -10,7 +10,3 @@ wget https://boostorg.jfrog.io/artifactory/main/release/${VERSION}/source/${BOOS

tar -xzf ${BOOST_NAME}.tar.gz
mv ${BOOST_NAME} ${BOOST_DIR}
cd ${BOOST_DIR}

./bootstrap.sh --prefix=.
$MODE ./b2 headers
16 changes: 4 additions & 12 deletions Makefile
Expand Up @@ -6,7 +6,7 @@ ROOT=.
MK.cmake=1
SRCDIR=.

MACOS_PACKAGES=openssl boost
MACOS_PACKAGES=openssl

include deps/readies/mk/main

Expand All @@ -32,7 +32,8 @@ make build # compile and link
GCC=1 # build with GCC (default unless Sanitizer)
CLANG=1 # build with CLang
STATIC_LIBSTDCXX=0 # link libstdc++ dynamically (default: 1)
BOOST_DIR= # boost installation path (default: empty)
BOOST_DIR= # Custom boost headers location path (default value: .install/boost).
# Can be left empty if boost is located in the standard system includes path.
make parsers # build parsers code
make clean # remove build artifacts
ALL=1|all # remove entire artifacts directory (all: remove Conan artifacts)
Expand Down Expand Up @@ -237,6 +238,7 @@ CMAKE_FILES+= \
endif

#----------------------------------------------------------------------------------------------
BOOST_DIR ?= $(ROOT)/.install/boost
_CMAKE_FLAGS += -DMODULE_NAME=$(MODULE_NAME) -DBOOST_DIR=$(BOOST_DIR)

ifeq ($(OS),macos)
Expand All @@ -245,16 +247,6 @@ endif

_CMAKE_FLAGS += $(CMAKE_ARGS) $(CMAKE_STATIC) $(CMAKE_COORD) $(CMAKE_TEST)

#----------------------------------------------------------------------------------------------

# BOOST_INC_PATH.centos:=/usr/include/boost169
# CC_INCLUDES.centos7 += $(BOOST_INC_PATH.centos)
# CC_INCLUDES.centos8 += $(BOOST_INC_PATH.centos)

CC_INCLUDES.macos += $(BOOST_DIR)/include

#----------------------------------------------------------------------------------------------

include $(MK)/defs

MK_CUSTOM_CLEAN=1
Expand Down

0 comments on commit c1535c6

Please sign in to comment.