3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-12-28 15:06:37 +00:00

Build native Z3 for x64 before generating docs (#8086)

* 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>
This commit is contained in:
Copilot 2025-12-16 03:41:27 +00:00 committed by GitHub
parent dd15a279fd
commit 8cda0fc69d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,10 +14,6 @@ concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
working-directory: src/api/js
env:
EM_VERSION: 3.1.73
@ -37,7 +33,13 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
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
@ -46,22 +48,19 @@ jobs:
version: ${{env.EM_VERSION}}
actions-cache-folder: "emsdk-cache"
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build:ts
- name: Build wasm
- name: Install emscripten
run: |
emsdk install ${EM_VERSION}
emsdk activate ${EM_VERSION}
source $(dirname $(which emsdk))/emsdk_env.sh
npm run build:wasm
- 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