3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-12-25 13:36:53 +00:00
z3/.github/workflows/docs.yml
Copilot 9a09b10cea
Fix docs.yml workflow: remove conflicting native build step (#8091)
* Initial plan

* Fix docs.yml workflow to properly build and deploy documentation

- Remove `no-install: true` from setup-emsdk step to properly install emscripten
- Remove `working-directory: src/api/js` from setup-emsdk step (not needed)
- Remove manual emsdk install/activate/source commands from Build wasm step
- Remove redundant native Z3 build step that conflicted with wasm build
- Simplify Generate Documentation step by removing redundant source command

The main issue was that the native Z3 build was creating a Makefile in the build/
directory before the wasm build ran. The wasm build script then saw the Makefile
existed and skipped the emconfigure step, but the native Makefile doesn't have a
libz3.a target, causing the build to fail. Removing the native build allows the
wasm build to properly configure its own build with emscripten.

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2025-12-16 23:14:55 +00:00

78 lines
1.7 KiB
YAML

name: Documentation
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
EM_VERSION: 3.1.73
jobs:
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz python3
- name: Setup emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: "emsdk-cache"
- name: Install dependencies
working-directory: src/api/js
run: npm ci
- name: Build TypeScript
working-directory: src/api/js
run: npm run build:ts
- name: Build wasm
working-directory: src/api/js
run: npm run build:wasm
- name: Generate Documentation (from doc directory)
working-directory: doc
run: python3 mk_api_doc.py --js --output-dir=api
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'doc/api/html'
deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-docs
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4