Skip to content

Conversation

@esafak
Copy link

@esafak esafak commented Dec 5, 2025

Why

The current build workflow only supports glibc 2.39, from ubuntu 24. This means users on older operating systems, for example, those running self-hosted Github Runners can't use rust-script.

This will

  • Enable workflow_dispatch for the release workflow.
  • Update conditional logic in create-release, crates, and binaries-release jobs to check for push events and tag creation only.
  • Rename the binaries job to binaries-release.
  • Add a new job named binaries-test that runs on workflow_dispatch to build and upload test binaries as artifacts.
  • Remove the definition of the GLIBC_VERSION environment variable from .github/workflows/release.yml.
  • Inline the hardcoded value 2.28 where \$ env.GLIBC_VERSION was previously used for x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu targets in both release job matrices.
  • Update GLIBC version usage in matrix targets for the new binaries-test job to use the format target.2.28 for glibc-dependent builds.

Testing

I manually triggered the release workflow and downloaded the rust-script-aarch64-unknown-linux-gnu.2.28 artifact, then inspected it in nushell:

> unzip rust-script-aarch64-unknown-linux-gnu.2.28.zip
Archive:  rust-script-aarch64-unknown-linux-gnu.2.28.zip
  inflating: rust-script

> objdump -T rust-script | lines |
    where ($it =~ "GLIBC_") |
    parse --regex ".*GLIBC_(?<version>[.0-9]*).*" |
    get version | sort | uniq

╭───┬──────╮
│ 0 │ 2.17 │
│ 1 │ 2.18 │
│ 2 │ 2.25 │
│ 3 │ 2.28 │
╰───┴──────╯

The highest number determines the glibc requirement, QED.

* Enable `workflow_dispatch` for the release workflow.
* Update conditional logic in `create-release`, `crates`, and `binaries-release` jobs to check for `push` events and tag creation only.
* Rename the `binaries` job to `binaries-release`.
* Add a new job named `binaries-test` that runs on `workflow_dispatch` to build and upload test binaries as artifacts.
* Remove the definition of the `GLIBC_VERSION` environment variable from `.github/workflows/release.yml`.
* Inline the hardcoded value `2.28` where `\$ env.GLIBC_VERSION ` was previously used for `x86_64-unknown-linux-gnu` and `aarch64-unknown-linux-gnu` targets in both release job matrices.
* Update GLIBC version usage in matrix targets for the new `binaries-test` job to use the format `target.2.28` for glibc-dependent builds.

Signed-off-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
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.

1 participant