47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
# Gitea selects .gitea/workflows before .github/workflows. Keep the inherited
|
|
# push/PR checks active here; the existing GitHub workflows remain independent.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
code: read
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUSTUP_TOOLCHAIN: nightly-2026-11-24
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
set -euo pipefail
|
|
sudo_cmd=()
|
|
if [ "$(id -u)" -ne 0 ]; then sudo_cmd=(sudo); fi
|
|
"${sudo_cmd[@]}" apt-get update
|
|
"${sudo_cmd[@]}" apt-get install -y ca-certificates curl build-essential cmake perl nasm pkg-config libcurl4-openssl-dev
|
|
|
|
- uses: https://github.com/dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc
|
|
with:
|
|
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
|
|
components: rustfmt, clippy
|
|
|
|
- name: Format
|
|
run: cargo fmt --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --locked --all-targets --features vendored-lua -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --locked --features vendored-lua
|