From 7563f0576f9cdcd86190c7e329f0b786ef8a5a35 Mon Sep 17 00:00:00 2001 From: Olivier Desenfans Date: Wed, 21 Feb 2024 17:39:11 +0100 Subject: [PATCH] Feature: package release artifacts as tarball This simplifies the download (1 file instead of 3). --- .github/workflows/ci.yml | 12 +++++++++--- .gitignore | 3 +++ README.md | 7 +++++++ scripts/install-stone-cli.sh | 8 ++++---- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d945f10..7a1bac2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,11 +85,17 @@ jobs: run: | cargo test --verbose + - name: Prepare release tarballs + if: startsWith(github.ref, 'refs/tags/') + run: | + tar --transform='s#.*/##' -cvzf stone-cli-linux-x86-64.tar.gz \ + target/release/stone-prover-cli \ + ${STONE_INSTALL_DIR}/cpu_air_prover \ + ${STONE_INSTALL_DIR}/cpu_air_verifier + - name: Upload release artifacts uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | - target/release/stone-prover-cli - ${{ env.STONE_INSTALL_DIR }}/cpu_air_prover - ${{ env.STONE_INSTALL_DIR }}/cpu_air_verifier + stone-cli-linux-x86-64.tar.gz diff --git a/.gitignore b/.gitignore index 1a5d894..249aa06 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ Cargo.lock # Stone prover and verifier dependencies/cpu_air_prover dependencies/cpu_air_verifier + +# Release tarballs +*.tar.gz diff --git a/README.md b/README.md index 0600dcd..687cc28 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,13 @@ Features: ## Install +Install dependencies. `libdw1` is required to run Stone and `wget` to download the installation script. + +```shell +# For Debian/Ubuntu +sudo apt install libdw1 wget +``` + ```shell wget -O - https://raw.githubusercontent.com/Moonsong-Labs/stone-prover-cli/main/scripts/install-stone-cli.sh | bash ``` diff --git a/scripts/install-stone-cli.sh b/scripts/install-stone-cli.sh index 6f1292e..b86c151 100644 --- a/scripts/install-stone-cli.sh +++ b/scripts/install-stone-cli.sh @@ -2,8 +2,9 @@ set -eo pipefail -VERSION="v0.1.0-rc1" +VERSION="v0.1.0-rc3" INSTALL_DIR="${HOME}/.stone/${VERSION}" +TARBALL="stone-cli-linux-x86-64.tar.gz" while true; do case "$1" in @@ -14,9 +15,8 @@ done echo "Installing Stone in ${INSTALL_DIR}..." mkdir -p "${INSTALL_DIR}" -wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.3.0/cpu_air_prover -O "${INSTALL_DIR}/cpu_air_prover" -wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.3.0/cpu_air_verifier -O "${INSTALL_DIR}/cpu_air_verifier" -wget https://github.com/Moonsong-Labs/stone-prover-cli/releases/download/${VERSION}/stone-prover-cli -O "${INSTALL_DIR}/stone-prover-cli" +wget https://github.com/Moonsong-Labs/stone-prover-cli/releases/download/${VERSION}/${TARBALL} -O "${INSTALL_DIR}/${TARBALL}" +tar -xf "${INSTALL_DIR}/${TARBALL}" echo "Configuring permissions..." chmod +x "${INSTALL_DIR}/cpu_air_prover"