-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): fix make clippy script and clippy CI job (#220)
* feat(ci): Fix make clippy script and clippy CI job * fix: Install toolchain required for clippy * fix: Fix clippy lints * chore(clippy): fix lints and improve clippy script * chore(clippy): build risc0 guest to compile driver and host * chore(clippy): add env vars * chore(clippy): fix lints * chore(clippy): do not specify projects for risc0 command * chore(clippy): install tools before running clippy * chore(ci): remove unused file * refactor(clippy): use build script instead of separate clippy script * refactor(clippy): move install script to separate step in job
- Loading branch information
1 parent
fd474e3
commit 62158a0
Showing
14 changed files
with
167 additions
and
119 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 |
---|---|---|
@@ -1,56 +1,56 @@ | ||
name: CI Build and Test - Reusable | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version_name: | ||
type: string | ||
required: true | ||
version_toolchain: | ||
type: string | ||
required: true | ||
workflow_call: | ||
inputs: | ||
version_name: | ||
type: string | ||
required: true | ||
version_toolchain: | ||
type: string | ||
required: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build-test: | ||
name: Build and test | ||
runs-on: [taiko-runner] | ||
timeout-minutes: 120 | ||
|
||
env: | ||
TARGET: ${{ inputs.version_name}} | ||
CI: 1 | ||
MOCK: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ inputs.version_toolchain }} | ||
profile: minimal | ||
- name: Install cargo-binstall | ||
uses: cargo-bins/[email protected] | ||
- name: Setup sccache | ||
if: ${{ inputs.version_name }} == risc0 | ||
uses: risc0/risc0/.github/actions/[email protected] | ||
- name: Install ${{ inputs.version_name }} | ||
run: make install | ||
- name: Build ${{ inputs.version_name }} prover | ||
run: make build | ||
- name: Test ${{ inputs.version_name }} prover | ||
run: make test | ||
- name: Build with tracer | ||
if: ${{ inputs.version_name }} == native | ||
run: cargo build -F tracer | ||
build-test: | ||
name: Build and test | ||
runs-on: [taiko-runner] | ||
timeout-minutes: 120 | ||
|
||
env: | ||
TARGET: ${{ inputs.version_name }} | ||
CI: 1 | ||
MOCK: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ inputs.version_toolchain }} | ||
profile: minimal | ||
|
||
- name: Install cargo-binstall | ||
uses: cargo-bins/[email protected] | ||
|
||
- name: Setup sccache | ||
if: ${{ inputs.version_name }} == risc0 | ||
uses: risc0/risc0/.github/actions/[email protected] | ||
|
||
- name: Install ${{ inputs.version_name }} | ||
run: make install | ||
|
||
- name: Build ${{ inputs.version_name }} prover | ||
run: make build | ||
|
||
- name: Test ${{ inputs.version_name }} prover | ||
run: make test | ||
|
||
- name: Build with tracer | ||
if: ${{ inputs.version_name }} == native | ||
run: cargo build -F tracer |
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,8 +1,8 @@ | ||
name: CI - Lint | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
@@ -17,15 +17,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: risc0/risc0/.github/actions/[email protected] | ||
- name: Run install script for all targets | ||
run: make install | ||
|
||
- uses: risc0/risc0/.github/actions/[email protected] | ||
|
||
- uses: risc0/clippy-action@main | ||
with: | ||
reporter: 'github-pr-check' | ||
fail_on_error: true | ||
clippy_flags: --workspace --all-targets --all-features -- -D warnings | ||
- name: Run clippy check for all targets | ||
run: make clippy | ||
|
||
fmt: | ||
name: fmt | ||
|
@@ -35,6 +31,5 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: risc0/risc0/.github/actions/[email protected] | ||
|
||
- run: make fmt | ||
- name: Run format script for all targets | ||
run: make fmt |
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
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
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
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,6 +86,7 @@ mod time { | |
} | ||
|
||
pub struct CycleTracker { | ||
#[allow(dead_code)] | ||
title: String, | ||
} | ||
|
||
|
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.