Skip to content

generate the typescript definitions from the rust types #9

generate the typescript definitions from the rust types

generate the typescript definitions from the rust types #9

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@nextest
- run: make test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: make fmt-check
- run: make check
- run: make doc
# the core has to keep building for the browser and for a target with no std,
# which is the whole reason its dependency list stays this short
portability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown, riscv32imac-unknown-none-elf
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: make wasm-check
- run: cargo check -p obby-proto --no-default-features --target riscv32imac-unknown-none-elf
- run: cargo check -p obby-client --no-default-features --target riscv32imac-unknown-none-elf
- run: make features
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.90
- run: cargo check --workspace --all-features
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: EmbarkStudios/cargo-deny-action@v2
bindings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: dart-lang/setup-dart@v1
- uses: taiki-e/install-action@v2
with:
tool: cbindgen
- uses: taiki-e/install-action@wasm-pack
# the release publishes what wasm-pack produces, so a cargo check alone would let a broken
# package reach npm
- run: make wasm
# the C header and the TypeScript definitions are generated, so a drifted one means an ABI
# changed without anyone saying so
- run: make header && git diff --exit-code bindings/obby-ffi/include
- run: make ts-types && git diff --exit-code bindings/obby-wasm/src/types.d.ts
- uses: actions/setup-node@v6
with:
node-version: "24"
- run: make ts-check
- run: make c-smoke
- run: make dart
hygiene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-machete
- run: make machete
- run: make dupes