Decouple Nanvix OS artifact download from z configure#58
Merged
Conversation
The `download_steps()` routine (run during `./z configure`) fetched the nanvix/nanvix OS release via `gh release download` to stage libposix.a, user.ld and the nanvixd binaries into the install prefix. Those artifacts are only consumed by `z test` (smoke + integration tests) and `z verify`; they are not needed to configure, build, or install the compiler. Coupling that download to configure forced a `gh` dependency (and GitHub authentication) onto every build, which breaks compiling GCC in minimal environments such as container image builds where `gh` is unavailable. Move the download into a dedicated `download_nanvix_os_artifacts()` function and invoke it on demand at the start of `test_steps` and `verify_steps`. `configure`/`build`/`install` no longer require `gh`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR decouples downloading Nanvix OS release artifacts (used only by z test / z verify) from the z configure workflow, removing the hard dependency on the GitHub CLI (gh) for minimal build environments.
Changes:
- Remove Nanvix OS artifact download logic from
download_steps()(configure path). - Introduce
download_nanvix_os_artifacts()as a dedicated, idempotent on-demand fetcher. - Invoke OS artifact download at the start of
test_steps()andverify_steps().
Show a summary per file
| File | Description |
|---|---|
z |
Moves Nanvix OS artifact fetching out of configure-time downloads and into on-demand test/verify steps via a new helper function. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
| [[ -f "${install_location}/libexec/nanvixd/kernel.elf" ]] && \ | ||
| [[ -f "${install_location}/libexec/nanvixd/linuxd.elf" ]] && \ | ||
| [[ -f "${install_location}/libexec/nanvixd/uservm.elf" ]]; then | ||
| echo "Nanvix OS libraries already present in '${install_location}/lib/'." |
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.
Problem
download_steps()(executed during./z configure) downloads thenanvix/nanvixOS release viagh release downloadto stagelibposix.a,user.ld, and thenanvixdbinaries into the installprefix. These artifacts are consumed only by
z test(smoke +integration tests) and
z verify— never by configure, build, or install.Coupling the download to
configureforces a hardgh(+ GitHub auth)dependency on every build. This breaks building GCC in minimal environments
such as container image builds, where
ghis not installed/authenticated.Concretely, it broke the
nanvix/toolchain-gccDocker build at./z configure --stage=0with "Failed to download Nanvix release."Fix
download_steps()(configure path).download_nanvix_os_artifacts()function.test_steps()andverify_steps().configure/build/installno longer depend ongh;test/verifyfetch the artifacts on demand (and skip if already present).
ghremains arequired package for the test/verify workflows.
Validation
bash -n zpasses;shellcheck -S error zis clean.zscripts do not download OS artifacts, so thisis the only place the coupling existed.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com