Skip to content

Commit 139e2e9

Browse files
igchorvinser52
authored andcommitted
Update dependencies (#95)
* Set dependencies to working versions and use dependencies from build context, instead of downloading cachelib:develop during build step. This makes sure that dependencies are always build in proper versions. * Fix CacheStats size
1 parent abe622a commit 139e2e9

File tree

7 files changed

+12
-16
lines changed

7 files changed

+12
-16
lines changed

.github/workflows/build-cachelib-docker.yml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- name: "checkout sources"
4141
uses: actions/checkout@v2
4242
with:
43+
submodules: recursive
4344
fetch-depth: 0
4445

4546
- name: Pull the image or rebuild and push it

cachelib/allocator/CacheStats.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct SizeVerify {};
5656

5757
void Stats::populateGlobalCacheStats(GlobalCacheStats& ret) const {
5858
#ifndef SKIP_SIZE_VERIFY
59-
SizeVerify<sizeof(Stats)> a = SizeVerify<16288>{};
59+
SizeVerify<sizeof(Stats)> a = SizeVerify<16640>{};
6060
std::ignore = a;
6161
#endif
6262
ret.numCacheGets = numCacheGets.get();

contrib/build-package.sh

-4
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ case "$1" in
197197
folly)
198198
NAME=folly
199199
SRCDIR=cachelib/external/$NAME
200-
update_submodules=yes
201200
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
202201
if test "$build_tests" = "yes" ; then
203202
cmake_custom_params="$cmake_custom_params -DBUILD_TESTS=ON"
@@ -209,7 +208,6 @@ case "$1" in
209208
fizz)
210209
NAME=fizz
211210
SRCDIR=cachelib/external/$NAME/$NAME
212-
update_submodules=yes
213211
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
214212
if test "$build_tests" = "yes" ; then
215213
cmake_custom_params="$cmake_custom_params -DBUILD_TESTS=ON"
@@ -221,7 +219,6 @@ case "$1" in
221219
wangle)
222220
NAME=wangle
223221
SRCDIR=cachelib/external/$NAME/$NAME
224-
update_submodules=yes
225222
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
226223
if test "$build_tests" = "yes" ; then
227224
cmake_custom_params="$cmake_custom_params -DBUILD_TESTS=ON"
@@ -240,7 +237,6 @@ case "$1" in
240237
fbthrift)
241238
NAME=fbthrift
242239
SRCDIR=cachelib/external/$NAME
243-
update_submodules=yes
244240
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
245241
;;
246242

docker/images/build-image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ echo "Build a Docker image tagged with: ${CONTAINER_REG}:${TAG}"
3535
docker build -t ${CONTAINER_REG}:${TAG} \
3636
--build-arg http_proxy=$http_proxy \
3737
--build-arg https_proxy=$https_proxy \
38-
-f ${OS}-${OS_VER}.Dockerfile .
38+
-f ${OS}-${OS_VER}.Dockerfile ../.. # need access to contrib and submodules

docker/images/centos-8streams.Dockerfile

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ RUN dnf -y install gcc-toolset-12
2323
RUN echo "source /opt/rh/gcc-toolset-12/enable" >> /etc/bashrc
2424
SHELL ["/bin/bash", "--login", "-c"]
2525

26-
COPY ./install-cachelib-deps.sh ./install-cachelib-deps.sh
27-
RUN ./install-cachelib-deps.sh
26+
COPY ./contrib ./contrib
27+
COPY ./docker ./docker
28+
COPY ./cachelib/external ./cachelib/external
2829

29-
COPY ./install-dsa-deps.sh ./install-dsa-deps.sh
30-
RUN ./install-dsa-deps.sh
30+
RUN ./docker/images/install-cachelib-deps.sh
31+
RUN ./docker/images/install-dsa-deps.sh

docker/images/install-cachelib-deps.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
# SPDX-License-Identifier: BSD-3-Clause
33
# Copyright 2022, Intel Corporation
44

5-
git clone -b develop https://github.com/intel/CacheLib CacheLib
6-
7-
./CacheLib/contrib/prerequisites-centos8.sh
5+
echo 'Defaults env_keep += "HTTPS_PROXY https_proxy HTTP_PROXY http_proxy NO_PROXY no_proxy"' >> /etc/sudoers
6+
./contrib/prerequisites-centos8.sh
87

98
for pkg in zstd googleflags googlelog googletest sparsemap fmt folly fizz wangle fbthrift ;
109
do
11-
sudo ./CacheLib/contrib/build-package.sh -j -I /opt/ "$pkg"
10+
sudo ./contrib/build-package.sh -j -I /opt/ "$pkg"
1211
done
1312

14-
rm -rf CacheLib

docker/images/install-dsa-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rm -rf idxd-config
1515
# Install DML Library
1616
git clone --recursive https://github.com/intel/DML.git
1717
cd DML
18-
git checkout e44443c24d53552b248b9869b1b16f89cd970f52
18+
git checkout v1.1.0
1919
mkdir build
2020
cd build
2121
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

0 commit comments

Comments
 (0)