Skip to content

Pin Z3 in kani-dependencies and bump it automatically - #5039

Merged
feliperodri merged 4 commits into
model-checking:mainfrom
feliperodri:z3-version-pin
Nov 10, 2026
Merged

feliperodri merged 4 commits into
model-checking:mainfrom
feliperodri:z3-version-pin

Conversation

@feliperodri

Copy link
Copy Markdown
Member

Depends on #5038. Until that merges, this PR's diff also shows its commit; only the second commit (Pin Z3 in kani-dependencies ...) is new here.

#5038 fixes CI by installing a pinned Z3 release on macOS instead of whatever Homebrew has. That stops new Z3 releases from breaking CI on their own, but nothing would ever move the pin forward. This makes the Z3 pin work like the CBMC one:

  • Z3_VERSION moves into kani-dependencies, next to CBMC_VERSION and KISSAT_VERSION, and scripts/setup/macos/install_deps.sh reads it from there.
  • A new weekly workflow, z3-update.yml, modelled on cbmc-update.yml, opens a PR that bumps Z3_VERSION when Z3 publishes a new (non-prerelease) release. If the release lacks the two macOS archives the setup script downloads (arm64-osx-13.3 and x64-osx-13.3), it files an issue instead.

One difference from the CBMC job: it doesn't run the regression suite itself. Only the macOS setup installs this Z3 (Ubuntu uses the distribution's package), so an Ubuntu run wouldn't test it; the bump PR's macOS CI jobs are the test. As with the other automatic update PRs, created with the workflow token, CI on those PRs needs a maintainer to trigger it.

I dry-ran the workflow's shell step locally against Z3's real releases: with the pin at 5.3.1 it does nothing, and with the pin set back to 5.2.0 it bumps kani-dependencies to 5.3.1 and selects create_pr. The PR and issue steps themselves only run on model-checking/kani, so they get exercised on the first scheduled run (or a manual workflow_dispatch).

…with brew

Homebrew no longer ships bottles for macOS 14 or for Intel Macs, so brew
install builds from source there. z3 5.3.1, released 2026-10-15, does not
compile with the macos-14 runner's clang, which fails every PR's macos-14
jobs, and fail-fast cancels the rest. On macos-15-intel, building Python and
its dependencies already took most of the 29-minute setup.

Install z3 from the official release binaries, as cvc5 is, and drop the brew
Python install: it was a workaround for Homebrew upgrading the runner's Python
when installing other formulae, and nothing installed here uses Homebrew's
Python any more.
Move the Z3 version the macOS setup installs into kani-dependencies, next to
the CBMC and Kissat pins, and add a scheduled workflow that opens a PR
bumping it when Z3 publishes a release, like cbmc-update.yml does for CBMC.
The job only checks that the release has the two macOS archives the setup
script downloads, and files an issue if it does not; the bump PR's macOS CI
jobs are what test the new version.
@feliperodri
feliperodri requested review from a team as code owners October 21, 2026 20:00
@feliperodri feliperodri added the [I] CI / Infrastructure Work done to CI, tests and infrastructure. label Oct 21, 2026
@feliperodri feliperodri self-assigned this Oct 21, 2026
@github-actions github-actions Bot added the Z-EndToEndBenchCI Tag a PR to run benchmark CI label Oct 21, 2026
@feliperodri
feliperodri requested a balanced review from Copilot November 6, 2026 18:55
@feliperodri feliperodri assigned rajath-mk and unassigned feliperodri Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
What changed in this PR

Pins Z3 versioning in kani-dependencies and introduces an automated weekly workflow to bump the pin when new Z3 releases are published, reducing CI breakage from upstream changes.

Changes:

  • Move Z3_VERSION into kani-dependencies and have macOS setup source it.
  • Add a scheduled GitHub Actions workflow to open PRs for Z3 version bumps (or issues when required macOS assets are missing).
  • Add basic validation that Z3_VERSION is set before downloading Z3 on macOS.
File Description
scripts/​setup/​macos/​install_deps.sh Reads Z3_VERSION from kani-dependencies and validates it before constructing download URLs.
kani-dependencies Adds Z3_VERSION alongside other tool pins.
.github/​workflows/​z3-update.yml New scheduled workflow that detects new Z3 releases and opens a PR (or issue) to update Z3_VERSION.

Review effort: Lite

Comment thread .github/workflows/z3-update.yml Resolved
Comment thread .github/workflows/z3-update.yml Resolved
Comment thread scripts/setup/macos/install_deps.sh Resolved
- Check for an existing Z3 upgrade issue with gh --jq length instead of grepping JSON.
- Pin dacbd/create-issue-action to the commit of its v2.0.0 release instead of main.
- Resolve kani-dependencies relative to install_deps.sh and source it with '.'.

Signed-off-by: Felipe R. Monteiro <[email protected]>

@rajath-mk rajath-mk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dry-ran the "Compare Z3 versions" step with gh stubbed to real release data: it picks create_pr and bumps the pin to 5.3.3 (released Oct 29 with both 13.3 zips), switches to create_issue when those archives are missing, and does nothing when the failure issue already exists. install_deps.sh also resolves kani-dependencies from any working directory. Approving

@feliperodri
feliperodri added this pull request to the merge queue Nov 10, 2026
Merged via the queue into model-checking:main with commit bf9c58e Nov 10, 2026
22 of 25 checks passed
@feliperodri
feliperodri deleted the z3-version-pin branch November 10, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[I] CI / Infrastructure Work done to CI, tests and infrastructure. Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants