Fix docs #32
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - "README.adoc" | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Test on Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set up Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Run tests | |
| run: cargo test --workspace | |
| - name: Run N-queens (n=8) example | |
| run: cargo run --release --example queens -- 8 | |
| test-windows: | |
| name: Test on Windows | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable-gnu | |
| - name: Set up Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Run tests | |
| run: cargo test --workspace | |
| - name: Run N-queens (n=8) example | |
| run: cargo run --release --example queens -- 8 | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Set up Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run rustfmt | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Set up Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run clippy | |
| run: cargo clippy --workspace --tests | |
| render: | |
| name: Render PDFs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Fontist | |
| uses: fontist/setup-fontist@v2 | |
| with: | |
| fontist-version: "^1.21" | |
| - name: Install fonts | |
| run: | | |
| fontist install "Libertinus Sans" | |
| fontist install "JetBrains Mono" | |
| - name: Setup Typst | |
| uses: typst-community/setup-typst@v4 | |
| with: | |
| typst-version: ^0.14 | |
| - name: Show Typst version | |
| run: typst --version | |
| - name: List available fonts | |
| run: typst fonts --font-path ~/.fontist/fonts | |
| - name: Compile guide on BDDs | |
| working-directory: docs/guide | |
| run: typst compile --font-path ~/.fontist/fonts main.typ guide-bdd.pdf | |
| - name: Compile guide on Abstract Interpretation | |
| working-directory: examples/abstract-interpretation/guide | |
| run: typst compile --font-path ~/.fontist/fonts main.typ guide-ai.pdf | |
| - name: Compile guide on Model Checking | |
| working-directory: examples/model-checking/guide | |
| run: typst compile --font-path ~/.fontist/fonts main.typ guide-mc.pdf | |
| - name: Prepare files for gh-pages | |
| run: | | |
| # Create public directory | |
| mkdir -p public | |
| # Copy all Typst PDFs | |
| cp docs/guide/guide-bdd.pdf public/ | |
| cp examples/abstract-interpretation/guide/guide-ai.pdf public/ | |
| cp examples/model-checking/guide/guide-mc.pdf public/ | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public | |
| force_orphan: true |