From 8bc79a6beb6413a3fc3a1708b736764f14840cee Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Mar 2026 17:41:38 -0600 Subject: [PATCH 1/3] [gpu] Dedicated docs + web demo CI workflow Move docs generation and deployment from linux.yml to a new docs.yml workflow. The new workflow also: - Installs Emscripten - Builds WebGL and WebGPU web demos - Copies demo output to docs/html/hb-gpu-demo/ - Deploys everything to harfbuzz.github.io on tagged releases Web demos will be available at harfbuzz.github.io/hb-gpu-demo/ Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/docs.yml | 74 +++++++++++++++++++++++++++++++++++++ .github/workflows/linux.yml | 8 ---- 2 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..380788cdb --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,74 @@ +name: docs + +on: + push: + branches: [ main ] + tags: ["*.*.*"] + pull_request: + branches: [ main ] + +permissions: + contents: read + +jobs: + docs: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup Ccache + uses: hendrikmuhs/ccache-action@33522472633dbd32578e909b315f5ee43ba878ce # v1.2.22 + with: + key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }} + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install \ + gcc \ + gobject-introspection \ + gtk-doc-tools \ + libcairo2-dev \ + libfreetype6-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libgraphite2-dev \ + libicu-dev \ + libpng-dev \ + pkg-config \ + zlib1g-dev + - name: Setup Emscripten + uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14 + with: + version: latest + - name: Setup Python + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: '3.12' + - name: Install Python Dependencies + run: pip3 install -r .ci/requirements.txt --require-hashes + - name: Build HarfBuzz + run: | + ccache --version + meson setup build \ + -Dauto_features=enabled \ + -Doptimization=2 \ + -Dgpu_demo=disabled + meson compile -Cbuild + - name: Generate Documentation + run: ninja -Cbuild harfbuzz-doc + - name: Build Web Demos + run: | + bash util/gpu/web/build.sh + bash util/gpu/web/build-webgpu.sh + cp util/gpu/web/dom.html util/gpu/web/out/ + - name: Stage for deployment + run: | + mkdir -p build/docs/html/hb-gpu-demo + cp util/gpu/web/out/* build/docs/html/hb-gpu-demo/ + - name: Deploy + if: github.ref_type == 'tag' + run: .ci/deploy-docs.sh + env: + GH_TOKEN: ${{ secrets.DOCS_PUSH_TOKEN }} + REVISION: ${{ github.sha }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3c7219c56..768ab497e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -66,14 +66,6 @@ jobs: run: | git reset --hard HEAD # ragel may have modified the source tree meson dist --no-tests -Cbuild - - name: Generate Documentations - run: ninja -Cbuild harfbuzz-doc - - name: Deploy Documentations - if: github.ref_type == 'tag' - run: .ci/deploy-docs.sh - env: - GH_TOKEN: ${{ secrets.DOCS_PUSH_TOKEN }} - REVISION: ${{ github.sha }} - name: Archive artifacts uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: From 1612415265aab71a63429de54ea0ca96530519ee Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Mar 2026 17:49:27 -0600 Subject: [PATCH 2/3] [gpu] Disable chafa in docs CI Not needed for docs/web demo build. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 380788cdb..a8fa1d01f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -53,7 +53,8 @@ jobs: meson setup build \ -Dauto_features=enabled \ -Doptimization=2 \ - -Dgpu_demo=disabled + -Dgpu_demo=disabled \ + -Dchafa=disabled meson compile -Cbuild - name: Generate Documentation run: ninja -Cbuild harfbuzz-doc From d4c659eca1d67f48d8942fd1977bf26a1a48e94e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Mar 2026 17:49:45 -0600 Subject: [PATCH 3/3] [gpu] Add help2man to docs CI Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a8fa1d01f..6122085e3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -36,7 +36,8 @@ jobs: libicu-dev \ libpng-dev \ pkg-config \ - zlib1g-dev + zlib1g-dev \ + help2man - name: Setup Emscripten uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14 with: