Skip to content

feat: add page-style runtime helpers to bindings #72

feat: add page-style runtime helpers to bindings

feat: add page-style runtime helpers to bindings #72

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
quality:
name: fmt + clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
bindings:
name: bindings smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: quality
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Lint Node native crate
run: cargo clippy --manifest-path bindings/gom-node/Cargo.toml --all-targets -- -D warnings
- name: Lint Python native crate
run: cargo clippy --manifest-path bindings/gom-python/Cargo.toml --all-targets -- -D warnings
- name: Build Node native binding
run: node bindings/gom-node/scripts/build-native.mjs --release
- name: Run Node binding smoke test
run: node bindings/gom-node/scripts/smoke.mjs
- name: Install maturin
run: python -m pip install maturin
- name: Build Python native binding wheel
run: python -m maturin build --manifest-path bindings/gom-python/Cargo.toml --release -o bindings/gom-python/dist
- name: Install Python native binding wheel
run: python -c "from pathlib import Path; import subprocess, sys; wheel = next(Path('bindings/gom-python/dist').glob('*.whl')); subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--force-reinstall', str(wheel)])"
- name: Run Python binding smoke test
run: python bindings/gom-python/scripts/smoke.py
test:
name: cargo test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs:
- quality
- bindings
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Run test suite
run: cargo test