Skip to content

chore(deps)(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 #286

chore(deps)(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0

chore(deps)(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 #286

Workflow file for this run

name: Lint
on:
pull_request:
merge_group:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
permissions: {}
jobs:
clippy:
name: Run clippy on crates
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
persist-credentials: false
- name: Install toolchains
uses: ./.github/actions/toolchains # zizmor: ignore[unpinned-uses]
- uses: dtolnay/rust-toolchain@22a6a5b0f9f487c5f5587025ae9d4a1caf2a8a78 # clippy
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
cache-on-failure: true
# Currently, sp1 and risc0 guest builds are skipped when it is invoked under clippy.
# This makes the whole build of clippy fail, so we run clippy on adapters and examples.
- name: Run clippy on adapters/
run: |
find adapters/ -type f -name "Cargo.toml" \
-exec sh -c \
'f="$1"; echo "Clippy for ${f}" && \
cargo clippy --manifest-path ${f} --all-features -- -D warnings' shell {} \;
env:
RUSTFLAGS: -D warnings
- name: Run clippy on examples/
run: |
find examples/ -type f -name "Cargo.toml" \
-exec sh -c \
'f="$1"; echo "Clippy for ${f}" && \
cargo clippy --manifest-path ${f} --all-features -- -D warnings' shell {} \;
env:
RUSTFLAGS: -D warnings
crate-checks:
name: Check that crates compile on their own
runs-on: ubuntu-latest
timeout-minutes: 90 # cold run takes a lot of time as each crate is compiled separately
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
persist-credentials: false
- name: Cleanup space
uses: ./.github/actions/cleanup # zizmor: ignore[unpinned-uses]
- name: Install toolchains
uses: ./.github/actions/toolchains # zizmor: ignore[unpinned-uses]
- uses: dtolnay/rust-toolchain@a02741459ec5e501b9843ed30b535ca0a0376ae4 # nightly
with:
toolchain: nightly-2024-07-27
- uses: taiki-e/install-action@1b0e852a3465a29cd0b17876f2de42a88d145e91 # cargo-hack
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
cache-on-failure: true
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
version: "v0.10.0" # sccache version
- run: cargo hack check --locked
fmt:
name: Check code formatting
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@a02741459ec5e501b9843ed30b535ca0a0376ae4 # nightly
with:
components: rustfmt
toolchain: nightly-2024-07-27
- run: cargo fmt --all --check
codespell:
name: Check code spellings
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
persist-credentials: false
- uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2
taplo:
name: Lint and check formatting of TOML files
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
persist-credentials: false
- name: Install taplo
run: |
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
- name: Run taplo lint
run: |
taplo lint
- name: Run taplo format check
run: |
taplo fmt --check
lint-success:
name: Check that lints passed
runs-on: ubuntu-latest
if: always()
needs:
- clippy
- crate-checks
- fmt
- codespell
- taplo
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
with:
jobs: ${{ toJSON(needs) }}