ai: add forgejo workflow

This commit is contained in:
Emil Lerch 2026-03-02 14:25:20 -08:00
parent e056cb9fec
commit 058f7b5c0f
Signed by: lobo
GPG key ID: A7B62D657EF764F8

70
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,70 @@
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-lint-
${{ runner.os }}-cargo-
- name: Run clippy
run: cargo clippy --all-features -- -D warnings -W clippy::pedantic
build-debug:
name: Build (debug)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-debug-
${{ runner.os }}-cargo-
- name: Build (debug)
run: cargo build
build-release:
name: Build (release)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-release-
${{ runner.os }}-cargo-
- name: Build (release)
run: cargo build --release