Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Documentation

on:
push:
branches: [canon]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages
cancel-in-progress: true

env:
LLVM_VERSION: "20"

jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: read
pages: read

steps:
- uses: actions/checkout@v4

- name: Install LLVM ${{ env.LLVM_VERSION }}, MLIR, and Doxygen
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main"
sudo apt-get update
sudo apt-get install -y \
clang-${LLVM_VERSION} \
clang-tidy-${LLVM_VERSION} \
doxygen \
llvm-${LLVM_VERSION}-dev \
libmlir-${LLVM_VERSION}-dev \
mlir-${LLVM_VERSION}-tools

- uses: astral-sh/setup-uv@v4

- name: Install documentation dependencies
run: uv sync --group docs

- name: Configure
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-${LLVM_VERSION} \
-DCMAKE_CXX_COMPILER=clang++-${LLVM_VERSION} \
-DMLIR_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/mlir \
-DLLVM_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/llvm \
-DWARPFORTH_ENABLE_DOCS=ON

- name: Build documentation
run: cmake --build build --target docs-warpforth

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/docs/html

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
needs: build
permissions:
pages: write
id-token: write

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

An MLIR-based Forth compiler for programming GPU kernels. WarpForth defines a custom MLIR dialect for Forth stack operations and lowers through a pipeline of passes to PTX assembly.

See the [documentation](https://tetsuo-cpp.github.io/warpforth/).

## Dependencies

- LLVM/MLIR
Expand Down
Loading