35 lines
688 B
YAML
35 lines
688 B
YAML
|
name: Main
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ "main" ]
|
||
|
pull_request:
|
||
|
branches: [ "main" ]
|
||
|
|
||
|
env:
|
||
|
CARGO_TERM_COLOR: always
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: docker
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
- uses: actions/cache@v4
|
||
|
id: cache-deps
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cargo/bin/
|
||
|
~/.cargo/registry/index/
|
||
|
~/.cargo/registry/cache/
|
||
|
~/.cargo/git/db/
|
||
|
target/
|
||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- uses: https://github.com/dtolnay/rust-toolchain@stable
|
||
|
with:
|
||
|
components: clippy
|
||
|
- name: Build
|
||
|
run: cargo build --verbose
|
||
|
- name: Run clippy
|
||
|
run: cargo clippy
|