Skip to content

Commit 72ab594

Browse files
committed
Silenced dependency warnings and updated boost version on ubuntu for sonar cloud scanning
1 parent 296e2f0 commit 72ab594

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,20 @@ jobs:
7979
with:
8080
fetch-depth: 0
8181
- name: Install dependencies
82-
run: sudo apt install -y libboost-all-dev libssl-dev libpq-dev
82+
run: sudo apt install -y libssl-dev libpq-dev
83+
# Ubuntu's apt Boost (1.83 on 24.04) predates Boost.Redis, which was added
84+
# in Boost 1.84, so <boost/redis.hpp> is absent. Install a newer Boost.
85+
# Boost.Redis/Asio are header-only, so we only need the headers plus the
86+
# CMake package config — building just Boost.System generates both quickly.
87+
- name: Install Boost >= 1.84 (for Boost.Redis)
88+
run: |
89+
BOOST_VERSION=1.86.0
90+
BOOST_DIR="boost_${BOOST_VERSION//./_}"
91+
wget -q "https://archives.boost.io/release/${BOOST_VERSION}/source/${BOOST_DIR}.tar.gz"
92+
tar xzf "${BOOST_DIR}.tar.gz"
93+
cd "${BOOST_DIR}"
94+
./bootstrap.sh
95+
sudo ./b2 install --prefix=/usr/local --with-system -j"$(nproc)"
8396
- name: Check compiler version, for debugging
8497
run: |
8598
g++ --version

scripts/build_dep.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ build_dep() {
2424
cmake .. \
2525
-DCMAKE_CXX_STANDARD=20 \
2626
-DCMAKE_BUILD_TYPE=Release \
27-
-DSKIP_BUILD_TEST=ON
27+
-DSKIP_BUILD_TEST=ON \
28+
-DCMAKE_CXX_FLAGS="-w" \
29+
-DCMAKE_C_FLAGS="-w"
2830
cmake --build . --parallel "$JOBS"
2931
)
3032
}

0 commit comments

Comments
 (0)