Skip to content

Commit

Permalink
circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaele-oplabs committed Jan 31, 2025
1 parent aa648ef commit 744519f
Showing 1 changed file with 43 additions and 12 deletions.
55 changes: 43 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,32 @@ executors:


jobs:
rust-init:
cargo-tests:
executor: default
environment:
CARGO_TERM_COLOR: always
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- rust-cache-v1-{{ checksum "Cargo.lock" }}
- rust-cache-v1-
- checkout
- run:
name: Generate testdata
command: just testdata
# Persist workspace for other jobs
- persist_to_workspace:
root: .
- run:
name: Run fuzz tests
command: cargo run --release -- -m 100 -t 4 --diff-count 50000
no_output_timeout: 20m
- save_cache:
key: rust-cache-v1-{{ checksum "Cargo.lock" }}
paths:
- .
cargo-tests:
- ~/.cargo
- target

cargo-lint:
executor: default
environment:
CARGO_TERM_COLOR: always
Expand All @@ -38,8 +49,31 @@ jobs:
- rust-cache-v1-{{ checksum "Cargo.lock" }}
- rust-cache-v1-
- run:
name: Run fuzz tests
command: cargo run --release -- -m 100 -t 4 --diff-count 50000
name: Check formatting
command: cargo fmt --all -- --check
- run:
name: Run clippy
command: cargo clippy --workspace --all --locked -- -D warnings
- save_cache:
key: rust-cache-v1-{{ checksum "Cargo.lock" }}
paths:
- ~/.cargo
- target

cargo-build:
executor: default
environment:
CARGO_TERM_COLOR: always
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- rust-cache-v1-{{ checksum "Cargo.lock" }}
- rust-cache-v1-
- run:
name: Build project
command: cargo build --workspace --all --locked
no_output_timeout: 20m
- save_cache:
key: rust-cache-v1-{{ checksum "Cargo.lock" }}
Expand Down Expand Up @@ -75,7 +109,4 @@ workflows:

rust-test-workflow:
jobs:
- rust-init
- cargo-tests:
requires:
- rust-init
- cargo-tests

0 comments on commit 744519f

Please sign in to comment.