-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0257f31
commit df6cce9
Showing
3 changed files
with
42 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,39 +1,60 @@ | ||
name: Build Program | ||
name: Rust CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Build | ||
name: Check and Lint | ||
runs-on: ubuntu-20.04 | ||
env: | ||
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | ||
RUST_BACKTRACE: "1" | ||
SP1_PATH: "/home/runner/.sp1" | ||
RUSTUP_HOME: "/home/runner/.rustup" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.79.0 | ||
toolchain: 1.81.0 | ||
components: clippy | ||
override: true | ||
|
||
- name: Install SP1 toolchain | ||
run: | | ||
curl -L https://sp1.succinct.xyz | bash | ||
~/.sp1/bin/sp1up | ||
~/.sp1/bin/cargo-prove prove --version | ||
~/.sp1/bin/sp1up | ||
echo "$SP1_PATH/bin" >> $GITHUB_PATH | ||
echo "$SP1_PATH/toolchains/succinct/bin" >> $GITHUB_PATH | ||
- name: Build SP1 program | ||
- name: Verify SP1 installation | ||
run: | | ||
cd program | ||
~/.sp1/bin/cargo-prove prove build | ||
cargo prove --version | ||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
env: | ||
CARGO_INCREMENTAL: 1 | ||
|
||
- name: debug env | ||
run: | | ||
echo $PATH | ||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
CARGO_INCREMENTAL: 1 | ||
PATH: ${{ env.SP1_PATH }}/bin:${{ env.SP1_PATH }}/toolchains/succinct/bin:${{ env.PATH }} | ||
with: | ||
command: clippy | ||
args: --all-features --all-targets -- -D warnings -A incomplete-features |
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