feat(shader): allow uploading and using a custom shader for sprites #699
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
paths-ignore: | |
- ".github/git-cliff.toml" | |
- "release-plz.toml" | |
- "LICENSE" | |
- "README.md" | |
- "CHANGELOG.md" | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- ".github/git-cliff.toml" | |
- "release-plz.toml" | |
- "LICENSE" | |
- "README.md" | |
- "CHANGELOG.md" | |
jobs: | |
# Check for formatting and clippy | |
style: | |
name: Code style check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy | |
# Check formatting | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
# Install required libraries | |
- name: Install dependencies | |
run: sudo apt-get install -y libasound2-dev libudev-dev | |
# Check clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets | |
# Make sure CI fails on all warnings, including Clippy lints | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
# Run a compilation check on Linux, macOS, and Windows | |
compile: | |
name: Compile | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
# Checkout the branch being tested | |
- uses: actions/checkout@v4 | |
# Install required libraries | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y libasound2-dev libudev-dev | |
# Install rust stable | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
# Check different feature combinations | |
- name: Build (no features) | |
run: cargo check --no-default-features | |
- name: Build (read-texture) | |
run: cargo check --features read-texture --examples | |
- name: Build (embed-assets) | |
run: cargo check --features embed-assets --examples | |
- name: Build (WASM) | |
run: cargo run --package run-wasm -- --example sprite --release --features embed-assets --build-only | |
# Run tests on Linux | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the branch being tested | |
- uses: actions/checkout@v4 | |
# Install required libraries | |
- name: Install dependencies | |
run: sudo apt-get install -y libasound2-dev libudev-dev | |
# Install rust stable | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
# Test all features on the target platform | |
- name: Test | |
run: cargo test --all-features |