From 25ecb5cf65070841c9fafb2d627bc8551acfeeb3 Mon Sep 17 00:00:00 2001 From: dm Date: Sun, 18 Aug 2024 23:01:15 +0300 Subject: [PATCH] Fix dependencies --- build_and_test.sh | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/build_and_test.sh b/build_and_test.sh index c6eb11e8..580ff047 100644 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -1,12 +1,38 @@ #!/bin/bash - +# Fix dependencies +set -o xtrace set -e +os=$(uname | tr '[:upper:]' '[:lower:]') +arch=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) git clone https://github.com/baking-bad/stone-prover.git /tmp/stone-prover cd /tmp/stone-prover || exit -./install_deps.sh + +if [ "$os" == "linux" ]; then + export DEBIAN_FRONTEND=noninteractive + + sudo apt-get install -y libtinfo5 libdw-dev libgmp3-dev + + pip install cpplint pytest numpy sympy==1.12.1 cairo-lang==0.12.0 + + wget "https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-$os-$arch" + chmod 755 "bazelisk-$os-$arch" + mv "bazelisk-$os-$arch" /bin/bazelisk + +elif [ "$os" == "darwin" ]; then + + brew install gmp + + python3 -m pip install cpplint pytest numpy sympy==1.12.1 cairo-lang==0.12.0 + + +else + echo "$os/$arch is not supported" + exit 1 + +fi bazelisk build //...