docs: add a few global solvers and problems to visualizer #241
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| jobs: | |
| fmt: | |
| name: rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install rustfmt | |
| run: rustup component add rustfmt | |
| - run: cargo fmt --all -- --check | |
| clippy: | |
| name: clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install clippy | |
| run: rustup component add clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --all-features --all-targets -- -D warnings | |
| docs: | |
| name: rustdoc | |
| runs-on: ubuntu-latest | |
| env: | |
| # rustdoc lints (broken links, redundant targets, missing docs, ...) | |
| # are warnings by default; -D promotes them to hard errors so docs | |
| # can't rot. Built with --all-features to exercise the feature-gated | |
| # backend impls, mirroring the docs.rs config. | |
| RUSTDOCFLAGS: -D warnings | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: docs | |
| - run: cargo doc --no-deps -p basin --all-features | |
| test: | |
| name: test (${{ matrix.features }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - features: default | |
| flags: "" | |
| - features: nalgebra | |
| flags: "--features nalgebra" | |
| - features: ndarray | |
| flags: "--features ndarray" | |
| - features: faer | |
| flags: "--features faer" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.features }} | |
| - run: cargo build -p basin ${{ matrix.flags }} | |
| - run: cargo test -p basin ${{ matrix.flags }} | |
| wasm: | |
| name: wasm build (${{ matrix.features }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - features: default | |
| flags: "" | |
| - features: nalgebra | |
| flags: "--features nalgebra" | |
| - features: ndarray | |
| flags: "--features ndarray" | |
| - features: faer | |
| flags: "--features faer" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Add wasm target | |
| run: rustup target add wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: wasm-${{ matrix.features }} | |
| - run: cargo build -p basin --target wasm32-unknown-unknown ${{ matrix.flags }} | |
| snippets: | |
| name: playground snippets compile | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: snippets | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install npm dependencies | |
| working-directory: web | |
| run: npm ci | |
| # Generates every snippet the landing-page playground can produce and | |
| # builds them against the in-repo basin crate, so the demo can't drift | |
| # from the real API. | |
| - name: Compile generated snippets | |
| working-directory: web | |
| run: npm run check:snippets | |
| versionary: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.RELEASE_TOKEN }} | |
| - id: versionary | |
| uses: jolars/versionary@v0 | |
| with: | |
| github-token: ${{ secrets.RELEASE_TOKEN }} |