From 33110ddaad72171c9aa2040fc37356dc2aaa4b57 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Dec 2025 03:41:27 +0000 Subject: [PATCH] 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> --- .github/workflows/docs.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e8258abe3..be06945d2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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