Skip to content

Commit

Permalink
Feature: package release artifacts as tarball
Browse files Browse the repository at this point in the history
This simplifies the download (1 file instead of 3).
  • Loading branch information
odesenfans committed Feb 21, 2024
1 parent a4828ac commit 7563f05
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ Cargo.lock
# Stone prover and verifier
dependencies/cpu_air_prover
dependencies/cpu_air_verifier

# Release tarballs
*.tar.gz
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
8 changes: 4 additions & 4 deletions scripts/install-stone-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 7563f05

Please sign in to comment.