From eb0c127397f7aeff6479e9cc00ef2d00b23fecdc Mon Sep 17 00:00:00 2001 From: nikola Date: Mon, 21 Oct 2024 17:56:27 +0300 Subject: [PATCH] add alpine-build.sh --- .github/workflows/release-alpine.yml | 4 ++-- alpine-build.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 alpine-build.sh diff --git a/.github/workflows/release-alpine.yml b/.github/workflows/release-alpine.yml index 5691f22d..acd38d49 100644 --- a/.github/workflows/release-alpine.yml +++ b/.github/workflows/release-alpine.yml @@ -36,8 +36,8 @@ jobs: - name: Build run: | - chmod +x ./build.sh - ./build.sh + chmod +x ./alpine-build.sh + ./alpine-build.sh - name: Test run: | diff --git a/alpine-build.sh b/alpine-build.sh new file mode 100644 index 00000000..dde914cb --- /dev/null +++ b/alpine-build.sh @@ -0,0 +1,26 @@ +#!/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/) + +apk add libtinfo libdw-dev gmp-dev python3=3.9.16-r0 py3-pip + +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" +sudo mv "bazelisk-$os-$arch" /bin/bazelisk + +git clone https://github.com/baking-bad/stone-prover.git /tmp/stone-prover + +cd /tmp/stone-prover || exit + +bazelisk build --cpu=$arch //... + +bazelisk test --cpu=$arch //... + +# Create symbolic links for cpu_air_prover and cpu_air_verifier +ln -s /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover /usr/local/bin/cpu_air_prover +ln -s /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier /usr/local/bin/cpu_air_verifier