Skip to content

feat: use compliant llvm + tket artifacts from hugrverse-env#1471

Merged
aborgna-q merged 44 commits into
mainfrom
feat/compliant-llvm
Apr 7, 2026
Merged

feat: use compliant llvm + tket artifacts from hugrverse-env#1471
aborgna-q merged 44 commits into
mainfrom
feat/compliant-llvm

Conversation

@jake-arkinstall
Copy link
Copy Markdown
Contributor

@jake-arkinstall jake-arkinstall commented Mar 25, 2026

Recovers manylinux 2.28 support for wheels, using TKET and LLVM sourced from hugrverse-env rather than 3rd party prebuilds.

Key things to know:

  • hugrenv.nix is used to fetch llvm and/or tket for a given platform, defaulting to both packages on the current system.
  • hugrenv.lock is used to pin the version and allow for caching in nix specifically. It can be downloaded from a release of hugrverse-env (as of 0.5.0).
    • we can look at making hugrenv a flake and thus a natural devenv input, but for now I don't want to make this nix dependant
    • we can also look at giving caching a wider net.
  • just update-hugrenv 1.2.3 bumps the hugrenv.lock (by downloading it from the release)
  • CI uses hugrenv.lock to fetch dependencies automatically in an action
    • we can look at moving the action to the hugrverse-env repo at a later point
  • devenv.nix now uses tket and LLVM from hugrverse-env.
    • LLVM in particular is a controversial choice but I justify it on two grounds:
      • nixpkgs has its own vision about llvm support, we have our own constraints. We have run into this issue previously and bringing the build in-house puts us in the driving seat.
      • eliminates potential "if it works on my machine" cases - CI builds and devenv builds should be 1:1
  • I have not explained this in documentation. I'd appreciate passing that ball to someone else.

@jake-arkinstall jake-arkinstall requested a review from a team as a code owner March 25, 2026 14:36
@jake-arkinstall jake-arkinstall requested a review from acl-cqc March 25, 2026 14:36
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.82%. Comparing base (a7c66f6) to head (9386975).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1471   +/-   ##
=======================================
  Coverage   83.82%   83.82%           
=======================================
  Files         187      187           
  Lines       28943    28943           
  Branches    27880    27880           
=======================================
  Hits        24262    24262           
  Misses       3520     3520           
  Partials     1161     1161           
Flag Coverage Δ
python 92.41% <ø> (ø)
qis-compiler 91.66% <ø> (ø)
rust 83.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings March 31, 2026 16:59
@jake-arkinstall jake-arkinstall marked this pull request as draft March 31, 2026 17:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restores manylinux 2.28 compatibility for qis-compiler wheels by switching CI/build tooling from system/third-party LLVM installs and locally-built tket-c-api artifacts to LLVM/tket bundles sourced from hugrverse-env.

Changes:

  • Update qis-compiler’s cibuildwheel configuration to build against manylinux 2.28 images and use hugrverse-provided LLVM/tket artifacts.
  • Refactor GitHub Actions workflows (CI, semver, release checks, wheel builds) to install LLVM/tket from hugrverse-env and remove the composite tket-c-api installer action.
  • Add Nix support for fetching hugrverse artifacts (hugrenv.nix) and wire it into devenv.nix.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
qis-compiler/pyproject.toml Switches manylinux images back to 2.28 and replaces LLVM/tket setup with hugrverse-env downloads across OSes.
hugrenv.nix New Nix helper to fetch a platform-specific hugrverse tket bundle.
devenv.nix Integrates hugrenv.nix and sets TKET_C_API_PATH for local dev shells.
devenv.lock Updates devenv inputs/locks (adds git-hooks-related inputs).
.gitignore Ignores /wheelhouse artifacts produced by cibuildwheel workflows.
.github/workflows/semver-checks.yml Replaces tket-c-api/LLVM installation with hugrverse-env downloads for semver checks.
.github/workflows/release-checks.yml Replaces tket-c-api installation with hugrverse-env tket download for release validation.
.github/workflows/python-wheels.yml Updates multi-platform wheel build matrix and installs hugrverse-env artifacts instead of apt/brew + tket-c-api action.
.github/workflows/python-qis-wheels.yml Re-enables ARM runner in the qis-compiler wheel build matrix.
.github/workflows/ci.yml Replaces apt LLVM + tket-c-api action usage with hugrverse-env installation across jobs.
.github/actions/tket-c-api/action.yml Removes the composite action previously used to build/cache tket-c-api.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread qis-compiler/pyproject.toml Outdated
Comment thread qis-compiler/pyproject.toml Outdated
Comment thread .github/workflows/python-wheels.yml Outdated
Comment thread .github/workflows/python-wheels.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread devenv.nix Outdated
Comment thread .github/workflows/python-wheels.yml Outdated
Comment thread .github/workflows/python-wheels.yml Outdated
Comment thread .github/workflows/semver-checks.yml Outdated
Comment thread .github/workflows/release-checks.yml Outdated
@jake-arkinstall jake-arkinstall changed the title feat: bring manylinux2.28 compliance back to qis-compiler feat: use compliant llvm + tket artifacts from hugrverse-env Apr 1, 2026
…aseline back to 2.28

Fix llvm-sys path

Add gcc-toolset-13 install back to cibw

Try using new hugrenv artifacts

Emit urls during install phase for debug

Bump to hugrenv 0.3.0c

Bump to hugrenv 0.3.0d (now with clang - windows failures expected as it's still building

Add backslashes, add tket c api path on macos

mkdir the hugrenv root before extracting to it, correct tar usage on windows qis-compiler builds

Update tar extraction path on windows

Try using windows RUNNER_TEMP as the hugrenv install dir

Try replacing slashes on windows

Try using python for tar extraction on windows (built-in tar doesn't seem to like windows paths)

Bump to hugrenv 0.3.0 (full release)
…ibtket.so and hugrverse's libtket.so may conflict). Add symengine as an explicit tket dependency for windows builds
@jake-arkinstall jake-arkinstall marked this pull request as ready for review April 6, 2026 21:41
@jake-arkinstall
Copy link
Copy Markdown
Contributor Author

it's done

I had to modify the python wheel tests to explicitly use a venv and use local tket-eccs and tket-exts packages, because uv seemed to randomly try to download them from pypi (where the latest release isn't compatible with the latest hugr).

Copy link
Copy Markdown
Collaborator

@aborgna-q aborgna-q left a comment

Choose a reason for hiding this comment

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

🚀

Comment thread .github/workflows/build_docs.yml Outdated
uses: ./.github/actions/tket-c-api


- uses: quantinuum/hugrverse-env/.github/actions/install-hugrenv@main
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a nitpick, but we could have install-hugrenv at the root of the repo so the callpoints are cleaner.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agree, will do that now

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/python-wheels.yml Outdated
Comment thread tket1-passes/build.rs Outdated
@aborgna-q
Copy link
Copy Markdown
Collaborator

aborgna-q commented Apr 7, 2026

Test run for the tket-py wheels: https://github.com/Quantinuum/tket2/actions/runs/24073720469

Can confirm that the wheels work fine. tket-0.12.16-cp310-abi3-manylinux_2_28_x86_64 actually only uses GLIBC_2.23 now.

jake-arkinstall and others added 5 commits April 7, 2026 12:00
- [x] Pull latest branch updates and inspect moved `fetch_hugrenv`
implementation
- [x] Add a default destination (`./target/hugrenv/`) so `just
fetch-hugrenv` works with no args
- [x] Update `scripts/fetch_hugrenv.py` to accept no argument and
default to `./target/hugrenv/`
- [x] Extend docs to explain when to avoid the default path
(shared/versioned central install paths)
- [x] Run relevant validation for changed files and summarize any
environment/tooling limitations

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jake-arkinstall
Copy link
Copy Markdown
Contributor Author

jake-arkinstall commented Apr 7, 2026

Question - why are the python wheels a dedicated action on workflow dispatch rather than automatically done on PR? Is it because of the prior breakages? If so we might revert that in this PR.

@jake-arkinstall
Copy link
Copy Markdown
Contributor Author

@aborgna-q I've addressed everything, I think - python wheel tests are passing and CI (at the time of writing) is looking like it'll pass too. If it doesn't I'll get back onto it but otherwise the ball is in your court!

@aborgna-q aborgna-q added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 6faaf41 Apr 7, 2026
31 checks passed
@aborgna-q aborgna-q deleted the feat/compliant-llvm branch April 7, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants