Skip to content

Unify Releases Across Operating Systems#1957

Merged
thomas-zahner merged 12 commits into
masterfrom
feat/streamline-release-workflow
Apr 24, 2026
Merged

Unify Releases Across Operating Systems#1957
thomas-zahner merged 12 commits into
masterfrom
feat/streamline-release-workflow

Conversation

@mre

@mre mre commented Dec 15, 2025

Copy link
Copy Markdown
Member

This merges the Windows/macOS/Linux build into one job in the release workflow. It follows the same principle as the release build for ripgrep.

Fixes #1875

@mre mre requested a review from thomas-zahner December 15, 2025 23:35
@mre

mre commented Dec 15, 2025

Copy link
Copy Markdown
Member Author

On the plus-side, it's shorter. On the "minus-side" I couldn't test it. 😅

@mre mre added the triage label Dec 16, 2025
@thomas-zahner

Copy link
Copy Markdown
Member

Thank you for addressing the issue. I would really like to test it before blindly merging it. 😅 And it also should be possible to do so by manually triggering the workflow on a non-tagged version. Maybe we would have to temporarily update the on: value to do so. But we should be able to run it. It's just Upload release archive which should fail then but everything before that should, i.e. building, should work anywhere. Maybe some small other adjustments would be necessary.

If you don't find the time to do so, you can let me know and I'll try do it. It's just that I don't want to debug the workflow during the next release but before merging this PR.

@mre

mre commented Mar 21, 2026

Copy link
Copy Markdown
Member Author

After rebasing onto master, I noticed that the goal of this PR has already been achieved: the current master already has a unified build-release matrix job covering Linux, macOS, and Windows in a single job. I believe we should be closing this as superseded. Thoughts?

@mre

mre commented Mar 25, 2026

Copy link
Copy Markdown
Member Author

Will close for now. I don't think there's anything that needs to be done here. As mentioned, we already have a matrix job.

@mre mre closed this Mar 25, 2026
@mre mre reopened this Mar 26, 2026
@mre

mre commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

Erm, sorry, diffed against the wrong branch. This wasn't fixed in master yet. Reopening.

This merges the Windows/macOS/Linux build into one job in the release workflow.
It follows the same principle as the release build for ripgrep.

Fixes #1875
@mre mre force-pushed the feat/streamline-release-workflow branch from 397d89d to e6d9480 Compare April 3, 2026 20:11
Comment thread .github/workflows/release-binary.yml Outdated
Comment thread .github/workflows/release-binary.yml Outdated
@mre

mre commented Apr 3, 2026

Copy link
Copy Markdown
Member Author

OK, this should be good to go. Thanks, Thomas for the suggestion to run a "test release."

This way, I uncovered an issue with our new file-limits support (#2106).

On Windows, I got

error[E0432]: unresolved imports `rlimit::Resource`, `rlimit::getrlimit`
   --> lychee-bin\src\main.rs:143:18
    |
143 |     use rlimit::{Resource, getrlimit, increase_nofile_limit};
    |                  ^^^^^^^^  ^^^^^^^^^ no `getrlimit` in the root
    |                  |
    |                  no `Resource` in the root
For more information about this error, try `rustc --explain E0432`.
error: could not compile `lychee` (bin "lychee") due to 1 previous error
Caused by:
  process didn't exit successfully:

Inside the rlimit crate, increase_nofile_limit(u64::MAX) evaluates internally via #[cfg(unix)] to attempt bumping to the max hard limit. If it fails, it still gracefully returns Ok(current_soft_limit). And on Windows, via #[cfg(windows)], it simply returns Ok(lim). Source code here.

This means rlimit is already entirely cross-platform and already provides the exact fallback semantics we want internally! The entire limit_result match statement with cfg(unix) and cfg(not(unix)) was just redundant boilerplate. :)

This run shows that all binaries build successfully: https://github.com/lycheeverse/lychee/actions/runs/23962659010/job/69895885187

actions/upload-release-asset@v1 is deprecated and relies on older, outdated versions of Node.js. The gh CLI tool is natively pre-installed on all GitHub-hosted runners (Ubuntu, macOS, and Windows). This makes it universally available without needing to download external dependencies or rely on third-party actions.

@thomas-zahner thomas-zahner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR, looks good! I've left a few comments & questions. Just don't forget to remove the temporary changes you intend to revert before merging.

Comment thread lychee-bin/src/main.rs
Comment thread .github/workflows/release-binary.yml
Comment thread .github/workflows/release-binary.yml Outdated
Comment thread .github/workflows/release-binary.yml
Comment thread .github/workflows/release-binary.yml
Comment thread .github/workflows/release-binary.yml Outdated
mre and others added 2 commits April 7, 2026 15:34
Co-authored-by: Thomas Zahner <thomas.zahner@protonmail.ch>
- Remove test-run scaffolding (tag_name/upload_url fallbacks and
  repo guard on get_release) now that the workflow is verified.
- Add a native strip step for x86_64-unknown-linux-gnu, which does
  not go through cross and was not being stripped.
- Consolidate macOS DMG upload into the single 'Upload release
  archive' step by appending the DMG to ASSET/ASSET_SUM instead of
  using a separate upload step with dedicated variables.
- Document why only aarch64-macos gets a DMG.
@mre

mre commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

Failing test is the flaky WayBackMachine test again...

@thomas-zahner

Copy link
Copy Markdown
Member

Failing test is the flaky WayBackMachine test again...

@katrinafyi Addressed this in 434ae96 :)

Thanks again for the PR, I'll test this with the new release

@thomas-zahner thomas-zahner merged commit 600b6e9 into master Apr 24, 2026
12 of 13 checks passed
@thomas-zahner thomas-zahner deleted the feat/streamline-release-workflow branch April 24, 2026 08:27
@mre mre mentioned this pull request Apr 24, 2026
@thomas-zahner

Copy link
Copy Markdown
Member

Seems to have worked! 🎉
Now it's just the docker step failing. It's no news that this is unstable but now it fails even after multiple retries.
I'll investigate this as part of #2037 and hope to come up with a stable long-term solution. I feel like docker releases were unreliable since a very long time.

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.

Streamline release for Windows & macOS

2 participants