Skip to content

Commit ef390b7

Browse files
committed
chore(backward): use shallow clone for backward compat tests
1 parent 2dc5c8a commit ef390b7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ BENCH_OP_FLAVOR?=DEFAULT
2020
NODE_VERSION=20
2121
FORWARD_COMPAT?=OFF
2222
BACKWARD_COMPAT_DATA_URL=https://github.com/zama-ai/tfhe-backward-compat-data.git
23+
BACKWARD_COMPAT_DATA_BRANCH=v0.1
2324
BACKWARD_COMPAT_DATA_DIR=tfhe-backward-compat-data
2425
# sed: -n, do not print input stream, -e means a script/expression
2526
# 1,/version/ indicates from the first line, to the line matching version at the start of the line
@@ -1016,7 +1017,7 @@ write_params_to_file: install_rs_check_toolchain
10161017

10171018
.PHONY: clone_backward_compat_data # Clone the data repo needed for backward compatibility tests
10181019
clone_backward_compat_data:
1019-
./scripts/clone_backward_compat_data.sh $(BACKWARD_COMPAT_DATA_URL) tfhe/$(BACKWARD_COMPAT_DATA_DIR)
1020+
./scripts/clone_backward_compat_data.sh $(BACKWARD_COMPAT_DATA_URL) $(BACKWARD_COMPAT_DATA_BRANCH) tfhe/$(BACKWARD_COMPAT_DATA_DIR)
10201021

10211022
tfhe/$(BACKWARD_COMPAT_DATA_DIR): clone_backward_compat_data
10221023

scripts/clone_backward_compat_data.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
if [ $# -lt 2 ]; then
6-
echo "$0 git_url dest_path"
5+
if [ $# -lt 3 ]; then
6+
echo "$0 git_url branch dest_path"
77
exit 1
88
fi
99

@@ -13,7 +13,8 @@ if ! git lfs env 2>/dev/null >/dev/null; then
1313
fi
1414

1515
if [ -d $2 ]; then
16-
cd $2 && git pull
16+
cd $2 && git fetch --depth 1 && git reset --hard origin/$2 && git clean -dfx
17+
1718
else
18-
git clone $1 $2
19+
git clone $1 -b $2 --depth 1
1920
fi

0 commit comments

Comments
 (0)