-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add rust-toolchain, rustfmt.toml, and clippy (#80)
* feat: add rust-toolchain and rustfmt.toml * fix actions * action * remove cargo check * pr --------- Co-authored-by: Ratan Kaliani <[email protected]>
- Loading branch information
1 parent
4267e3e
commit edcbc28
Showing
30 changed files
with
296 additions
and
499 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,47 @@ | ||
name: Test setup | ||
inputs: | ||
pull_token: | ||
description: "Token to use for private repo access" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up git private repo access | ||
shell: bash | ||
run: | | ||
git config --global url."https://${{ inputs.pull_token }}@github.com/".insteadOf ssh://[email protected] | ||
git config --global url."https://${{ inputs.pull_token }}@github.com".insteadOf https://github.com | ||
- name: Install Go 1.22 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
cache-dependency-path: "**/go.sum" | ||
|
||
- name: Print go version | ||
shell: bash | ||
run: go version | ||
|
||
- name: Setup GCC | ||
uses: Dup4/actions-setup-gcc@v1 | ||
with: | ||
version: latest | ||
|
||
- name: rust-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
~/.rustup/ | ||
key: rust-1.79.0-${{ hashFiles('**/Cargo.toml') }} | ||
restore-keys: rust-1.79.0- | ||
|
||
- name: Setup toolchain | ||
id: rustc-toolchain | ||
shell: bash | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.79.0 -y |
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,49 @@ | ||
name: PR | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- "**" | ||
paths: | ||
- "crates/**" | ||
- "client-programs/**" | ||
- "native-host/**" | ||
- "zkvm-host/**" | ||
- "op-succinct-proposer/**" | ||
- "Cargo.toml" | ||
merge_group: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Formatting & Clippy | ||
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"] | ||
env: | ||
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup CI | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
env: | ||
CARGO_INCREMENTAL: 1 | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-features --all-targets -- -D warnings -A incomplete-features | ||
env: | ||
CARGO_INCREMENTAL: 1 |
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
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
Submodule sp1-contracts
updated
from 9494bb to dd93a9
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
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
Oops, something went wrong.