3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-20 07:36:31 +00:00
z3/.github/workflows
Alcides Fonseca 78818f9ae1 python: build a PyPI-publishable Pyodide (PEP 783) wheel
z3 already builds under Pyodide, but via `pyodide build` the resulting
wheel is tagged `emscripten_<pyodide-version>_wasm32` and only usable as a
CI artifact. PEP 783 introduced the portable `pyemscripten_<date>_wasm32`
tag that PyPI accepts and micropip can install at runtime. This makes z3
produce that wheel via `cibuildwheel --platform pyodide`.

Changes:

* setup.py: for the emscripten target, use the wheel platform tag that
  pyodide-build supplies verbatim via _PYTHON_HOST_PLATFORM (e.g.
  `pyemscripten_2026_0_wasm32`) instead of reconstructing an
  `emscripten_*` tag, falling back to the old behaviour when that env var
  is absent.

* setup.py / CMakeLists.txt / pyproject.toml: switch the Pyodide build
  from JS-based exceptions (`-fexceptions`, `-sDISABLE_EXCEPTION_CATCHING=0`)
  to native wasm exception handling (`-fwasm-exceptions
  -sSUPPORT_LONGJMP=wasm`), matching the ABI of the Pyodide 314 /
  emscripten 5 main module. With the old flags libz3.so imports `invoke_*`
  trampolines the runtime no longer provides, so the wheel builds but the
  first Z3 call fails at runtime with
  "Dynamic linking error: cannot resolve symbol invoke_vi".

* pyproject.toml: add [tool.cibuildwheel] / [tool.pyodide.build] config so
  `cibuildwheel --platform pyodide` builds and tests the wheel.

* add .github/workflows/pyodide-pypi.yml building the wheel with
  cibuildwheel and publishing it to PyPI (trusted publishing) on tags. The
  existing pyodide.yml artifact build is left unchanged.

Verified with cibuildwheel 4.1.0 / pyodide-build 0.35.0 / emscripten 5.0.3:
the resulting z3_solver-4.17.0.0-py3-none-pyemscripten_2026_0_wasm32.whl
passes z3test.py in the Pyodide runtime and solves SMT problems both under
node and in a browser via micropip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 12:36:27 +01:00
..
shared Upgrade agentic workflows to gh-aw v0.36.0 (#8122) 2026-01-08 11:50:35 -08:00
a3-python.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
a3-python.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
academic-citation-tracker.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
academic-citation-tracker.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
agentics-maintenance.yml gh aw init 2026-06-11 14:27:37 -07:00
android-build.yml Bump actions/upload-artifact from 4 to 7 (#9827) 2026-06-11 21:19:49 -07:00
api-coherence-checker.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
api-coherence-checker.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
build-warning-fixer.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
build-warning-fixer.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
build-z3-cache.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
ci.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
code-conventions-analyzer.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
code-conventions-analyzer.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
code-simplifier.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
code-simplifier.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
compare-stats-anomaly-reporter.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
compare-stats-anomaly-reporter.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
copilot-setup-steps.yml update aw to current version 2026-01-08 18:15:03 +00:00
coverage.yml Bump actions/upload-artifact from 4 to 7 (#9827) 2026-06-11 21:19:49 -07:00
cross-build.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
csa-analysis.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
csa-analysis.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
docs.yml Bump actions/upload-artifact from 4 to 7 (#9827) 2026-06-11 21:19:49 -07:00
fstar-master-build.yml Bump actions/upload-artifact from 4 to 7 (#9827) 2026-06-11 21:19:49 -07:00
issue-backlog-processor.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
issue-backlog-processor.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
mark-prs-ready-for-review.yml Bump actions/github-script from 8.0.0 to 9.0.0 (#9296) 2026-04-19 16:49:03 +02:00
memory-safety-report.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
memory-safety-report.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
memory-safety.yml Bump actions/upload-artifact from 4 to 7 (#9827) 2026-06-11 21:19:49 -07:00
msvc-static-build-clang-cl.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
msvc-static-build.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
nightly-validation.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
nightly.yml Lcube (#9858) 2026-06-14 16:25:21 -07:00
nuget-build.yml Lcube (#9858) 2026-06-14 16:25:21 -07:00
ocaml.yaml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
ostrich-benchmark.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
ostrich-benchmark.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
pyodide-pypi.yml python: build a PyPI-publishable Pyodide (PEP 783) wheel 2026-06-17 12:36:27 +01:00
pyodide.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
qf-s-benchmark.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
qf-s-benchmark.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
release-notes-updater.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
release-notes-updater.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
release.yml Lcube (#9858) 2026-06-14 16:25:21 -07:00
smtlib-benchmark-finder.lock.yml Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
smtlib-benchmark-finder.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
specbot-crash-analyzer.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
specbot-crash-analyzer.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
tactic-to-simplifier.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
tactic-to-simplifier.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
tptp-benchmark.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
tptp-benchmark.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
wasm-release.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
wasm.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
Windows.yml Lcube (#9858) 2026-06-14 16:25:21 -07:00
wip.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9715) 2026-06-04 16:14:05 -07:00
workflow-suggestion-agent.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
workflow-suggestion-agent.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00
zipt-code-reviewer.lock.yml Bump actions/checkout from 6.0.2 to 6.0.3 (#9828) 2026-06-11 21:19:13 -07:00
zipt-code-reviewer.md Suppress auto-created failure issues for agentic workflows (#9834) 2026-06-11 20:57:43 -07:00