Skip to content

Commit

Permalink
CircleCI setup (#3)
Browse files Browse the repository at this point in the history
* CircleCI Commit

* Add check command to deny
  • Loading branch information
graysonarts authored Jul 18, 2024
1 parent ba67bea commit 122fdb3
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
version: 2.1
commands:
cargo_step:
parameters:
args:
type: string
steps:
- checkout
- restore_cache:
keys:
- rust-deps-{{ checksum "Cargo.lock" }}
- rust-tools-
- run:
name: Run cargo << parameters.args >>
command: cargo << parameters.args >>
- save_cache:
key: rust-deps-{{ checksum "Cargo.lock" }}
paths:
- ~/.cargo

jobs:
install_tools:
docker:
- image: cimg/rust:1.79.0
steps:
- checkout
- restore_cache:
keys:
- rust-deps-{{ checksum "Cargo.lock" }}
- rust-tools-
- run:
name: Install binstall
command: cargo install --locked cargo-binstall
- run:
name: Binstall cargo-audit
command: cargo binstall --locked -y cargo-audit
- run:
name: Binstall cargo-deny
command: cargo binstall --locked -y cargo-deny
- save_cache:
key: rust-tools-
paths:
- ~/.cargo
check:
docker:
- image: cimg/rust:1.79.0
steps:
- cargo_step:
args: check
audit:
docker:
- image: cimg/rust:1.79.0
steps:
- cargo_step:
args: audit
deny:
docker:
- image: cimg/rust:1.79.0
steps:
- cargo_step:
args: deny check
workflows:
PR:
jobs:
- install_tools
- audit:
requires:
- install_tools
- deny:
requires:
- install_tools
- check:
requires:
- install_tools

0 comments on commit 122fdb3

Please sign in to comment.