Convert to use egui
instead
#6
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
on: [pull_request, workflow_dispatch] | |
name: CI | |
env: | |
# --cfg=web_sys_unstable_apis 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: -D warnings --cfg=web_sys_unstable_apis | |
RUSTDOCFLAGS: -D warnings | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo check --all-features | |
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 --all-features --lib --target wasm32-unknown-unknown | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev | |
- run: cargo test --lib | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- run: cargo clippy -- -D warnings | |
trunk: | |
name: trunk | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.76.0 | |
target: wasm32-unknown-unknown | |
override: true | |
- 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 frontend/index.html | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
TARGET: x86_64-unknown-linux-musl | |
- os: ubuntu-latest | |
TARGET: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
TARGET: x86_64-pc-windows-msvc | |
steps: | |
- name: Building ${{ matrix.TARGET }} | |
run: echo "${{ matrix.TARGET }}" | |
- uses: actions/checkout@master | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.TARGET }} | |
- run: cargo build --release --target=${{ matrix.TARGET }} | |