Rostyslav Tyshko 3389c6162c fix
2024-11-10 03:03:19 +01:00

109 lines
3.0 KiB
YAML

on:
push:
branches:
- master
paths-ignore:
- "**.md"
- "!.github/workflows/*.yml"
pull_request:
paths-ignore:
- "**.md"
- "!.github/workflows/*.yml"
name: General
jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60
name: build - ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: install risc0
if: success() || failure()
run: |
curl -L https://risczero.com/install | bash && source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc
- uses: Swatinem/rust-cache@v2
- run: cargo build
lint:
strategy:
matrix:
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60
name: lint - ${{ matrix.crate }} - ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: cargo fmt
if: success() || failure()
run: cargo fmt -- --check
- name: cargo clippy
if: success() || failure()
run: |
cargo clippy --release -- -D warnings
- name: install risc0
if: success() || failure()
run: |
curl -L https://risczero.com/install | bash && source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc
- name: install taplo
if: success() || failure()
run: |
cargo install taplo-cli --locked
- name: taplo fmt
if: success() || failure()
run: |
taplo fmt --check
test:
strategy:
matrix:
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
timeout-minutes: 60
name: test - ${{ matrix.crate }} - ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v2
- name: install risc0
if: success() || failure()
run: |
curl -L https://risczero.com/install | bash && source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc
- name: test mempool
if: success() || failure()
run: cargo test -p mempool
- name: test storage
if: success() || failure()
run: cargo test -p storage
- name: test zkvm
if: success() || failure()
run: cargo test -p zkvm