54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
# Continuous integration for Regent (Gitea Actions).
|
|
#
|
|
# The build needs the GTK 4 / libadwaita development headers (cargo compiles the
|
|
# crate, it does not run the Meson UI build). The Rust toolchain is pinned: the
|
|
# `clippy -- -D warnings` gate is calibrated to a specific compiler, so a moving
|
|
# `stable` would reintroduce lint drift. `cargo-deny` fetches the RustSec advisory
|
|
# database at run time, so the job needs network.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install the GTK/libadwaita build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential pkg-config libgtk-4-dev libadwaita-1-dev
|
|
|
|
- name: Install Rust (pinned)
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: 1.99.1
|
|
components: clippy
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Test
|
|
run: cargo test --locked
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --all-targets --locked -- -D warnings
|
|
|
|
- name: Install cargo-deny
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: cargo-deny
|
|
|
|
- name: cargo-deny
|
|
run: cargo deny check
|