-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add risc0-install action shared across workflows (#1379)
- Loading branch information
Showing
5 changed files
with
51 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Install risc0' | ||
description: 'Installs risc0 toolchain' | ||
|
||
inputs: | ||
github_token: | ||
description: 'GitHub token for authentication' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: [email protected] | ||
|
||
- name: Install risc0-zkvm toolchain | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
run: cargo risczero install --version r0.1.79.0-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,14 +86,10 @@ jobs: | |
uses: dtolnay/rust-toolchain@nightly | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
tool: [email protected] | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build citrea | ||
run: make build-release | ||
env: | ||
|
@@ -127,14 +123,10 @@ jobs: | |
components: rustfmt, clippy | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
tool: [email protected] | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Check TOML | ||
uses: dprint/[email protected] | ||
- name: Run lint | ||
|
@@ -166,14 +158,10 @@ jobs: | |
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
tool: [email protected] | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run cargo-udeps | ||
env: | ||
RUSTFLAGS: -A warnings | ||
|
@@ -205,14 +193,10 @@ jobs: | |
uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@nextest | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
tool: [email protected] | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Cache ethereum-tests | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -373,14 +357,10 @@ jobs: | |
uses: dtolnay/[email protected] | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
tool: [email protected] | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# `cargo-nextest` is much faster than standard `cargo test`. | ||
- uses: taiki-e/install-action@nextest | ||
- name: Cache ethereum-tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,18 +35,10 @@ jobs: | |
rustup install 1.79.0 | ||
rustup default 1.79.0 | ||
- name: Install Cargo Binstall | ||
run: | | ||
cargo install --version 1.7.0 cargo-binstall | ||
- name: Install cargo-risczero | ||
run: | | ||
cargo binstall [email protected] --no-confirm | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Project | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,14 +31,10 @@ jobs: | |
components: rustfmt, clippy | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-risczero | ||
uses: taiki-e/install-action@v2 | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
tool: [email protected] | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Cache ethereum-tests | ||
uses: actions/cache@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,19 +33,10 @@ jobs: | |
rustup install 1.79.0 | ||
rustup default 1.79.0 | ||
- name: Install Cargo Binstall | ||
run: | | ||
source $HOME/.cargo/env | ||
cargo install --version 1.7.0 cargo-binstall | ||
- name: Install cargo-risczero | ||
run: | | ||
cargo binstall [email protected] --no-confirm | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Project | ||
env: | ||
|
@@ -79,17 +70,10 @@ jobs: | |
rustup install 1.79.0 | ||
rustup default 1.79.0 | ||
- name: Install Cargo Binstall | ||
run: | | ||
source $HOME/.cargo/env | ||
cargo install --version 1.7.0 cargo-binstall | ||
- name: Install cargo-risczero | ||
run: | | ||
cargo binstall [email protected] --no-confirm | ||
- name: Install risc0-zkvm toolchain | ||
run: cargo risczero install --version r0.1.79.0-2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install risc0 | ||
uses: ./.github/actions/install-risc0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Project | ||
env: | ||
REPR_GUEST_BUILD: 1 | ||
|