Enhancements and BFs after PLATAN (#18) #51
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-checks | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
# This is required to enable the web_sys clipboard API which egui_web uses | |
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html | |
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html | |
RUSTFLAGS: --cfg=web_sys_unstable_apis | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo check | |
check_wasm: | |
name: Check wasm32 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- run: cargo check | |
fmt_lint: | |
name: Format and lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- run: | | |
cargo fmt -- --check | |
cargo clippy -- -D warnings | |
trunk: | |
name: trunk | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- name: Download and install Trunk binary | |
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- | |
- name: Build | |
run: ./trunk build |