Make the environment resolvable, and run the tests in CI - #25
Open
baggepinnen wants to merge 2 commits into
Open
Make the environment resolvable, and run the tests in CI#25baggepinnen wants to merge 2 commits into
baggepinnen wants to merge 2 commits into
Conversation
`Pkg.resolve` has never worked in this project. `acados_jll` and
`tera_renderer_jll` are dependencies of MPCComponents, which this package depends
on, but they were listed here only under `[extras]`, and a `[sources]` entry binds
only for a package the active project itself depends on. The resolver therefore
had no version to place for them and failed with
ERROR: Unsatisfiable requirements detected for package acados_jll [49ddb18e]:
acados_jll [49ddb18e] has no known versions!
LinearMPC was in the same position but failed less visibly: it is registered, so a
resolve quietly took the release in place of the fork carrying the disturbance
cross term, which MPCComponents needs. All three move to `[deps]`, with compat
bounds, even though nothing here calls them; that is what makes the sources bind.
MultibodyComponents no longer comes from a local checkout. The registered 0.2.4
resolves against this stack, so the `../MultibodyComponents` path source is gone
and neither environment needs anything beside the registries and the remaining
sources. That is also what makes CI possible: a runner has no sibling checkout.
The CI workflow follows MPCComponents': Julia 1.12 on the self-hosted runner,
the private-registry setup step, then buildpkg and runtest. `JULIA_PKG_USE_CLI_GIT`
is set for the same reason it is there -- the unregistered packages are cloned over
Git and need the credentials the registry step installs.
GLMakie leaves the test dependencies. Its only use is inside an `if false` block
that renders the multibody model, it is not otherwise loaded, and it cannot
precompile without a display, so on a headless runner it would fail the test
environment for a code path that never runs. Add it back locally to use that block.
Both manifests are re-resolved from scratch rather than edited. test/runtests.jl
against the result: 3108 codegen, 217 MPC program, 13 MPC multirate program, 7 MPC
multirate model, all passing, none failed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sgq4SoUgK37T6grZRYE2FS
The job queued indefinitely and never started. This repository is public, and the organization's `Default` runner group has `allows_public_repositories: false`, so a public repository cannot route to it at all. Public repositories are served by a separate `public` runner group, and by deliberate design no scale set in it advertises the bare `self-hosted` label -- that keeps those runners off the radar of workflows that have not opted in -- so `runs-on: self-hosted` matches nothing and the job waits forever rather than failing. The tiers that have to be named are `self-hosted-2vcpu-4gb-public`, `self-hosted-4vcpu-8gb-public`, `self-hosted-8vcpu-16gb-public` and `self-hosted-8vcpu-32gb-public`. This suite compiles the multibody models and builds acados, so it takes the heavy-compute tier. JuliaComputing/Multibody.jl, also public, targets the same one for the same reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sgq4SoUgK37T6grZRYE2FS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes both environments resolvable from a bare clone, and adds a CI workflow that runs the test suite.
Pkg.resolvehas never worked hereacados_jllandtera_renderer_jllare dependencies of MPCComponents, which this package depends on, but they were listed here only under[extras]. A[sources]entry binds only for a package the active project itself depends on, so the resolver had no version to place for them:That is why the manifests are checked in and why the last two dependency updates had to edit them in place rather than resolve.
LinearMPC was in the same position and failed less visibly. It is registered, so instead of erroring the resolver quietly took the release in place of the
feat/disturbance-cross-termfork that MPCComponents needs forSd. I hit exactly this while testing the fix: with only the two JLLs moved, a from-scratch resolve producedLinearMPC v0.10.0with norepo-rev.All three move to
[deps]with compat bounds. Nothing here calls them; being a declared dependency is simply what makes the source bind.MultibodyComponents no longer comes from a local checkout
The registered 0.2.4 resolves against this stack, so the
../MultibodyComponentspath source is gone and the compat bound moves to0.2.4. The README's claim that "the registered release does not resolve against these pins" was true when written and is not any more.This is also what makes CI possible at all — a runner has no sibling checkout to point a path source at.
After both changes,
Pkg.resolve()succeeds in the package and test environments from nothing but the registries and the remaining sources, and every fork binds as intended:Both manifests are re-resolved from scratch rather than edited. They stay checked in, so an instantiate still reproduces the exact stack the tests ran against.
CI
.github/workflows/CI.ymlfollows MPCComponents': Julia 1.12 on the self-hosted runner,JuliaComputing/set-up-private-juliahub-registries, thenjulia-buildpkgandjulia-runtest, on pushes tomain, tags, and pull requests, with the same concurrency group.JULIA_PKG_USE_CLI_GITis set for the same reason it is set there: the unregistered packages are cloned over Git and need the credentials the registry step installs. No Documentation workflow, since this repository has nodocs/.GLMakie leaves the test dependencies. Its only use is inside an
if falseblock that renders the multibody model; it is never loaded, and it cannot precompile without a display — it fails here withduring initialization of module GLFW— so on a headless runner it would fail the test environment for a code path that never runs. Add it back locally to use that block. Say the word if you would rather keep it and let the runner deal with it.Verification
julia --project=test test/runtests.jlagainst the fully re-resolved environment:No failures. The workflow itself only proves out once it runs on this PR.
Also fixes a typo I introduced in #23: the simulation-only paragraph read "
[sources]names branch / a branch build of LinearMPC".🤖 Generated with Claude Code
https://claude.ai/code/session_01Sgq4SoUgK37T6grZRYE2FS