Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: replace stone-prover module by stone-prover-sdk #37

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

env:
CARGO_TERM_COLOR: always
STONE_SDK_VERSION: v0.3.0
STONE_INSTALL_DIR: ./dependencies/stone

jobs:
build:
Expand Down Expand Up @@ -50,17 +52,32 @@ jobs:
- name: Cargo fmt
run: cargo fmt --check

- name: Log in to Github container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set Stone SDK version in context
id: set-env-sdk-version
run: |
echo "STONE_SDK_VERSION=${STONE_SDK_VERSION}" >> $GITHUB_ENV
echo "STONE_INSTALL_DIR=${STONE_INSTALL_DIR}" >> $GITHUB_ENV

- name: Cache Stone prover and verifier
id: cache-stone
uses: actions/cache@v4
with:
path: ${{ env.STONE_INSTALL_DIR }}
key: stone-${{ runner.os }}-${{ env.STONE_SDK_VERSION }}

- name: Set cache image environment variables
- name: Download Stone
if: steps.cache-stone.outputs.cache-hit != 'true'
run: |
# Uppercase characters are not allowed in Docker tags
cache_image=$(echo ghcr.io/${GITHUB_REPOSITORY}/build-cache | tr '[:upper:]' '[:lower:]')
echo "STONE_PROVER_DOCKER_CACHE=$(echo ${cache_image})" >> $GITHUB_ENV
mkdir -p "${STONE_INSTALL_DIR}"
wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/${STONE_SDK_VERSION}/cpu_air_prover -O "${STONE_INSTALL_DIR}/cpu_air_prover"
wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/${STONE_SDK_VERSION}/cpu_air_verifier -O "${STONE_INSTALL_DIR}/cpu_air_verifier"

- name: Download Docker cache image (if available)
run: docker pull ${STONE_PROVER_DOCKER_CACHE} || true
- name: Set Stone in PATH
run: |
INSTALL_DIR=$(readlink -f ${STONE_INSTALL_DIR})
echo "${INSTALL_DIR}" >> $GITHUB_PATH
chmod +x ${INSTALL_DIR}/cpu_air_prover
chmod +x ${INSTALL_DIR}/cpu_air_verifier

- name: Build
run: cargo build --verbose
Expand All @@ -70,11 +87,3 @@ jobs:

- name: Run tests
run: cargo test --verbose

- name: Push the image to the cache
# It's not possible to push packages from fork PRs.
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
docker tag stone-prover-build:latest ${STONE_PROVER_DOCKER_CACHE}
docker push ${STONE_PROVER_DOCKER_CACHE}

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

Loading
Loading