37 lines
776 B
YAML
37 lines
776 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
ci:
|
|
if: false # TODO: remove once runners are fixed
|
|
runs-on: docker
|
|
container:
|
|
image: rust:latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install rustfmt and clippy
|
|
run: rustup component add rustfmt clippy
|
|
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: ${{ runner.os }}-cargo-
|
|
|
|
- name: Build
|
|
run: cargo build
|
|
|
|
- name: Format
|
|
run: cargo fmt --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy -- -D warnings
|