chore: unify comments & derive macro usage #107
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: Rust | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install wasm32-unknown-unknown target | |
run: rustup target add wasm32-unknown-unknown | |
# With no feature. Target: normal & wasm | |
- name: Build | |
run: cargo build --verbose | |
- name: Build in wasm | |
run: cargo build --verbose --target wasm32-unknown-unknown | |
# With feature `svg`. Target: normal & wasm | |
- name: Build with `svg` | |
run: cargo build --verbose -F svg | |
- name: Build with `svg` in wasm | |
run: cargo build --verbose -F svg --target wasm32-unknown-unknown | |
# With feature `image`. Target: normal only | |
- name: Build with `image` | |
run: cargo build --verbose -F image | |
# With feature `wasm-bindgen`. Target: wasm only | |
- name: Build with `wasm-bindgen` | |
run: cargo build --verbose -F wasm-bindgen --target wasm32-unknown-unknown | |
# Benchmarks | |
- name: Build benchmarks | |
run: cargo build --benches | |
examples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Examples | |
- name: Build examples | |
run: | | |
for example in examples/*.rs; do | |
cargo run --example "$(basename "${example%.rs}")" -Fsvg,image | |
done | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Tests | |
- name: Run tests | |
run: cargo test --verbose -F svg,image | |
meta: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Typos | |
- name: typos-action | |
uses: crate-ci/typos@v1.0.4 |