Skip to content

Commit c11e028

Browse files
authored
[FIX] script for detecting plonky3gpu version (#1730)
1 parent a5a7844 commit c11e028

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

crates/gpu_override/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ clean:
1616
build:
1717
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build -Z unstable-options --release -p prover --lockfile-path ./Cargo.lock
1818

19+
version:
20+
echo ${GO_TAG}-${GIT_REV}-${ZK_VERSION}
1921
# update Cargo.lock while override config has been updated
2022
#update:
2123
# GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build -Z unstable-options --release -p prover --lockfile-path ./Cargo.lock
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
#!/bin/bash
22

3-
config_file=.cargo/config.toml
4-
plonky3_gpu_path=$(grep 'path.*plonky3-gpu' "$config_file" | cut -d'"' -f2 | head -n 1)
5-
plonky3_gpu_path=$(dirname "$plonky3_gpu_path")
6-
7-
if [ -z $plonky3_gpu_path ]; then
8-
exit 0
9-
else
10-
pushd $plonky3_gpu_path
11-
commit_hash=$(git log --pretty=format:%h -n 1)
12-
echo "${commit_hash:0:7}"
13-
14-
popd
15-
fi
3+
higher_plonky3_item=`grep "plonky3-gpu" ./Cargo.lock | sort | uniq | awk -F "[#=]" '{print $3" "$4}' | sort -k 1 | tail -n 1`
4+
5+
higher_version=`echo $higher_plonky3_item | awk '{print $1}'`
6+
7+
higher_commit=`echo $higher_plonky3_item | cut -d ' ' -f2 | cut -c-7`
8+
9+
echo "$higher_version"
10+
echo "$higher_commit"

zkvm-prover/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ DUMP_DIR = .work
3838
prover:
3939
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZKVM_COMMIT=${ZKVM_COMMIT} $(MAKE) -C ../crates/gpu_override build
4040

41+
version:
42+
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZKVM_COMMIT=${ZKVM_COMMIT} $(MAKE) -C ../crates/gpu_override version
43+
4144
prover_cpu:
4245
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build --locked --release -p prover
4346

0 commit comments

Comments
 (0)