mirror of
https://github.com/Z3Prover/z3
synced 2025-12-25 13:36:53 +00:00
* Initial plan * Build Z3 for ubuntu x64 and invoke JS build scripts in docs workflow - Modified docs.yml to build Z3 natively for ubuntu-latest x64 before documentation generation - Removed default working directory to allow explicit working-directory per step - Added step to build Z3 using python scripts/mk_make.py - Kept emscripten setup as required for wasm build - Modified mk_api_doc.py to invoke npm run build:ts and npm run build:wasm as described in src/api/js/README.md - mk_api_doc.py now runs the full build process (TypeScript + wasm) before generating documentation Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Source emsdk environment before generating documentation - Added source command to ensure emscripten tools are in PATH when mk_api_doc.py runs npm scripts - This ensures emcc and other emscripten tools are available for npm run build:wasm Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Revert changes to mk_api_doc.py - Removed npm run build:ts and npm run build:wasm calls from mk_api_doc.py - Reverted to only calling npm run docs as before 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>
84 lines
1.9 KiB
YAML
84 lines
1.9 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: Build Z3 for ubuntu-latest x64
|
|
run: |
|
|
python3 scripts/mk_make.py
|
|
cd build
|
|
make -j$(nproc)
|
|
|
|
- name: Setup emscripten
|
|
uses: mymindstorm/setup-emsdk@v14
|
|
with:
|
|
no-install: true
|
|
version: ${{env.EM_VERSION}}
|
|
actions-cache-folder: "emsdk-cache"
|
|
|
|
- name: Install emscripten
|
|
run: |
|
|
emsdk install ${EM_VERSION}
|
|
emsdk activate ${EM_VERSION}
|
|
|
|
- name: Install JS dependencies
|
|
working-directory: src/api/js
|
|
run: npm ci
|
|
|
|
- name: Generate Documentation (from doc directory)
|
|
working-directory: doc
|
|
run: |
|
|
source $(dirname $(which emsdk))/emsdk_env.sh
|
|
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
|