Skip to content

Fix PrimePi to handle symbolic numeric constants like E and Pi #360

Fix PrimePi to handle symbolic numeric constants like E and Pi

Fix PrimePi to handle symbolic numeric constants like E and Pi #360

Workflow file for this run

name: Publish Website
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Cache WASM build output
id: wasm-cache
uses: actions/cache@v4
with:
path: tests/playground/pkg
key: wasm-pkg-${{ hashFiles('src/**', 'Cargo.lock', 'Cargo.toml') }}
- name: Setup Rust
if: steps.wasm-cache.outputs.cache-hit != 'true'
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache Cargo registry and build artifacts
if: steps.wasm-cache.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: wasm-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
wasm-cargo-
- name: Install wasm-pack
if: steps.wasm-cache.outputs.cache-hit != 'true'
uses: jetli/wasm-pack-action@v0.4.0
- name: Build WASM playground
if: steps.wasm-cache.outputs.cache-hit != 'true'
run: make wasm-build-production
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: jupyterlite-woxi-kernel/package-lock.json
- name: Build JupyterLite kernel extension
run: |
cd jupyterlite-woxi-kernel && npm install && npx tsc
uvx --python 3.12 --from jupyter-core --with jupyterlab \
jupyter labextension build .
- name: Build JupyterLite
run: |
uvx \
--python 3.12 \
--with jupyterlite-core \
--with jupyterlab \
--with ./jupyterlite-woxi-kernel \
jupyter lite build --output-dir tests/jupyterlite
cp -r tests/playground/pkg tests/jupyterlite/wasm
- name: Setup Nix
uses: cachix/install-nix-action@v31
- name: Build documentation
run: nix develop -c mdbook build ./tests
- name: Assemble deployment tree
run: |
cp -R tests/landing/. tests/book/
cp -R tests/playground/pkg tests/book/pkg
rm -rf tests/book/playground
cp -R tests/playground tests/book/playground
rm -rf tests/book/jupyterlite
cp -R tests/jupyterlite tests/book/jupyterlite
cp tests/cli/favicon.png tests/book/favicon.png
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: tests/book
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4