Skip to content

Commit 6484c89

Browse files
committed
positioned deps installation before cache
1 parent a8d9316 commit 6484c89

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/merged_build.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,9 @@ jobs:
159159
IMAGE_TAG="${CIBW_MANYLINUX_AARCH64_IMAGE:-manylinux_unknown}"
160160
fi
161161
SAFE_FLAGS="$(echo "${FLAGS}" | tr ' /' '__')"
162-
CACHE_TARBALL="/cibw-cache/rocksdb-v${ROCKSDB_VERSION}-${ARCH}-${LIBC}-${IMAGE_TAG}-flags-${SAFE_FLAGS}.tar.gz"
163-
if [ -f "${CACHE_TARBALL}" ]; then
164-
echo "✅ Restoring cached RocksDB from ${CACHE_TARBALL}"
165-
mkdir -p "${PREFIX}"
166-
tar -xzf "${CACHE_TARBALL}" -C /
167-
ldconfig || true
168-
exit 0
169-
fi
170-
echo "ℹ️ No cache found. Building RocksDB and caching..."
171-
# Install deps
162+
163+
164+
# Install deps (to make downstream code consistent, because clang is forced it is installed here - otherwise there is a failure)
172165
if [ "${LIBC}" = "musl" ]; then
173166
apk add --no-cache \
174167
bash build-base clang clang-dev cmake git ninja \
@@ -190,6 +183,18 @@ jobs:
190183
gflags-devel snappy-devel lz4-devel zlib-devel bzip2-devel \
191184
libzstd-devel liburing-devel)
192185
fi
186+
187+
CACHE_TARBALL="/cibw-cache/rocksdb-v${ROCKSDB_VERSION}-${ARCH}-${LIBC}-${IMAGE_TAG}-flags-${SAFE_FLAGS}.tar.gz"
188+
if [ -f "${CACHE_TARBALL}" ]; then
189+
echo "✅ Restoring cached RocksDB from ${CACHE_TARBALL}"
190+
mkdir -p "${PREFIX}"
191+
tar -xzf "${CACHE_TARBALL}" -C /
192+
ldconfig || true
193+
exit 0
194+
fi
195+
196+
echo "ℹ️ No cache found. Building RocksDB and caching..."
197+
193198
WORKDIR="$(mktemp -d)"
194199
cd "${WORKDIR}"
195200
wget -q "https://github.com/facebook/rocksdb/archive/refs/tags/v${ROCKSDB_VERSION}.tar.gz"

0 commit comments

Comments
 (0)