ci: name the bintest build in ci/gcc-clang - #7140
Conversation
`build_config/ci/gcc-clang.rb` defines three builds. Two carry a name, `full-debug` and `cxx_abi`, and the middle one is written without one, so `MRuby::Build#initialize` gives it the default `host`. CI prints `>>> Test host <<<` for it, which says nothing about what separates it from the other two: it is the only build in the file that calls `enable_bintest`, and the only one that adds `mruby-bin-debugger` back after the `full-core` gembox leaves it out. That coverage is what it alone carries, so `bintest` is the name it takes here. Nothing in the file needs the build to be called `host`. All three are `MRuby::Build` rather than `MRuby::CrossBuild`, and each pulls `mruby-bin-mrbc` in through `full-core`, so no target falls back to the `mrbc` of a `host` build in `MRuby::Build#mrbcfile`. The name reaches three other places: `install_prefix`, the installer that `define_installer_if_needed` defines only when `host?` answers true, and the `mrbtest` that `rake clean` removes from `MRUBY_ROOT/bin`. The workflows that read this config run `rake -m test:run:serial` and `rake test`, and neither installs nor cleans, so none of the three fires. What the rename costs is the `bin/` entries a developer gets from pointing `MRUBY_CONFIG` at this config by hand. `build_config/default.rb` is the config for that; this one is read by `.github/workflows/build.yml` and `coverage.yml`. `build_config/ci/msvc.rb` keeps the default name. It holds a single build, with no sibling for a name to tell it apart from. `MRUBY_CONFIG=ci/gcc-clang rake -m test` passes: no failures in the three mrbtest runs, and 116 of 116 in the bintest run.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CI configuration gives the binary test build the explicit name ChangesBinary test build
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This change only gives the CI bintest build a descriptive name, with the reported test and bintest runs remaining green; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
build_config/ci/gcc-clang.rbdefines three builds, and two of them carry aname. The middle one is written as
MRuby::Build.new do |conf|, soMRuby::Build#initializegives it the defaulthost, and every line CI printsfor it reads
>>> Test host <<<.That name says nothing about the build. What separates it from its two siblings
is that it is the only one in the file that calls
enable_bintest, and theonly one that adds
mruby-bin-debuggerback after thefull-coregemboxleaves it out. This names it
bintestafter that coverage, so the CI log andthe build directory both say which of the three is speaking.
Why the
hostname is free to give up herehostis load bearing elsewhere, so it is worth spelling out that no part ofit applies to this file.
MRuby::Build#mrbcfilefalls back to themrbcof ahosttarget only fora build that is not itself
host. All three builds here areMRuby::Buildrather than
MRuby::CrossBuild, and each pullsmruby-bin-mrbcin throughfull-core, so every one of them already has its own.install_prefixsends a nonhostbuild to<prefix>/mruby/<name>, anddefine_installer_if_neededdefines an installer intoMRUBY_ROOT/binonlywhen
host?answers true. Both run underrake install.rake cleanremovesmrbtestfromMRUBY_ROOT/binfor thehosttarget.The workflows that read this config run
rake -m test:run:serial(
build.yml) andrake test(coverage.yml). Neither installs nor cleans, andrun_testandrun_bintestreach the binaries throughbuild_dirand theBUILD_DIRenvironment variable rather than throughbin/, so none of theabove is on the path CI takes.
The one real cost is for a developer who points
MRUBY_CONFIGat this configby hand: the
bin/entries stop appearing, because only ahostbuildinstalls them.
build_config/default.rbis the config for that use, and thisfile exists to be read by the two workflows above.
build_config/ci/msvc.rbis left alone. It holds a single build, so there is nosibling for a name to tell it apart from, and the default reads fine there.
Verification
MRUBY_CONFIG=ci/gcc-clang rake -m teston Linux with gcc:The bintest run is the one the rename could have broken, since it resolves
mrdband the other binaries at run time; it stays green.Summary by CodeRabbit