Skip to content

feat: add GIF and color_quant dependencies; enhance GIF output handling #207

feat: add GIF and color_quant dependencies; enhance GIF output handling

feat: add GIF and color_quant dependencies; enhance GIF output handling #207

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
fmt:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Engine dependency direction
run: python tools/check_architecture.py
- name: Cargo fmt
run: cargo fmt --all -- --check
machete:
name: Unused Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-machete
uses: taiki-e/install-action@v2
with:
tool: cargo-machete
- name: Cargo machete
run: cargo machete
test:
name: Test (${{ matrix.os }})
needs: fmt
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libdbus-1-dev libudev-dev libwayland-dev libxkbcommon-dev pkg-config
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Restore Cargo cache
# Toolchain + lockfile + target host remain part of rust-cache's key.
# Share dependency artifacts with later Clippy and ignored-test jobs.
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-workspace
- name: Cargo test
if: runner.os != 'Windows'
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo test --workspace
- name: Cargo test (Windows, non-graphics)
if: runner.os == 'Windows'
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo test --workspace --exclude perro_graphics
- name: Cargo test (Windows graphics, serial GPU access)
if: runner.os == 'Windows'
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo test -p perro_graphics -- --test-threads=1
editor:
name: Perro Editor Project
needs: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux system dependencies
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libdbus-1-dev libudev-dev libwayland-dev libxkbcommon-dev pkg-config
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-workspace
- name: Check editor scripts
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo run -p perro_cli -- check --path perro_editor
- name: Clippy editor scripts and run project doctor
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo run -p perro_cli -- clippy --path perro_editor
- name: Test editor scripts
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo run -p perro_cli -- test --path perro_editor
slow-test:
name: Slow Tests (nested cargo check)
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux system dependencies
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libdbus-1-dev libudev-dev libwayland-dev libxkbcommon-dev pkg-config
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-workspace
- name: Cargo test (ignored)
env:
PERRO_AUDIO_DISABLED: "1"
run: cargo test -p perro_compiler -- --ignored
clippy:
name: Clippy (${{ matrix.os }})
needs: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libdbus-1-dev libudev-dev libwayland-dev libxkbcommon-dev pkg-config
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: wasm32-unknown-unknown
- name: Restore Cargo cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-workspace
- name: Cargo clippy
run: cargo clippy --workspace --all-targets -- -D warnings