Set up a CI pipeline, but haven't tested it yet
Some checks failed
CI / Test (Linux) (push) Has been cancelled
CI / Test (Windows MSVC) (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (push) Has been cancelled

This commit is contained in:
Eric Ratliff
2026-02-22 07:53:00 -06:00
parent 970479f4b6
commit 0d3987f76e

103
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,103 @@
name: CI
on:
workflow_dispatch:
push:
branches: [master, develop]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
test-linux:
name: Test (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: linux-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: linux-cargo-
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Check for warnings
run: cargo build 2>&1 | grep -c "warning" | xargs test 0 -eq
test-windows:
name: Test (Windows MSVC)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry and build
uses: actions/cache@v4
with:
path: |
~\.cargo\registry
~\.cargo\git
target
key: windows-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: windows-cargo-
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo registry and build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: clippy-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: clippy-cargo-
- name: Run clippy
run: cargo clippy -- -D warnings
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --check