Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create release for Ubuntu 20.04 #562

Closed

Conversation

alandefreitas
Copy link
Collaborator

This commit adds a new workflow that creates a Linux release on Ubuntu 20.04. This allows the release package to be used on more versions of Ubuntu. Since the C++ compilers we need are not available in Ubuntu 20.04, we use the clang executable from our own LLVM built from source to build the dependencies and MrDocs.

@alandefreitas alandefreitas force-pushed the ubuntu20-release branch 9 times, most recently from 1d3912c to 037c9d1 Compare April 8, 2024 23:51
@alandefreitas alandefreitas force-pushed the ubuntu20-release branch 11 times, most recently from 7c28b59 to acaaa27 Compare April 11, 2024 01:21
@alandefreitas alandefreitas force-pushed the ubuntu20-release branch 8 times, most recently from 432772d to e216916 Compare April 11, 2024 23:06
This commit adds a new workflow that creates a Linux release on Ubuntu 20.04. This allows the release package to be used on more versions of Ubuntu. Since the C++ compilers we need are not available in Ubuntu 20.04, we use the clang executable from our own LLVM built from source to build the dependencies and MrDocs.
@alandefreitas
Copy link
Collaborator Author

While working on many things related to Antora + Mrdocs, I've been exploring this solution in parallel for about 10 days now. As each attempt might take a couple of hours, I've been tweaking CI here and there and seeing how it goes in parallel.

It's a good time to concede defeat. It's safe to say this is a bad idea to solve #547 because it's very unstable:

  • It's overly complex / try-hard: To build MrDocs on Ubuntu 20.04 we need a custom-built compiler built with the tools Ubuntu 20.04 provides (clang + libcxx is the only option here) and then build LLVM again with this new custom toolchain. This involves many fine details that are hard to get right. It's also hard to maintain because we may need to adapt that workflow whenever MrDocs needs more new C++ features.
  • It's slow: even with caching, building this custom toolchain and then building LLVM with it is much slower than the usual CI workflow. And every once in a while, the cache will need to be rebuilt, and building the toolchain twice might take over 2 hours.
  • It's not general enough: This strategy allows us to support Ubuntu >=20.04 instead of Ubuntu >=22.04 or Ubuntu >=23.04. It doesn't generalize to other platforms, like the strategy CMake uses (APBuild, which is equivalent to a wrapper).
  • It doesn't work properly. I've tried dozens of ways to make it work. If we don't statically link libc++ then we have the same problem generating the demos because we now have a compatible libc version but not a compatible libc++ on the machine using the release. But if we attempt to statically link libc++ we get other problems because clanglib doesn't support that properly.

Considering these limitations, the next idea I'll explore to solve #547 is a wrapper overriding system libs. This strategy is somewhat similar to what APBuild does but it's manually and more stable. It's similar to how CMake provides its binaries. This wrapper also seemed like a complex solution at first but it turns out to be much simpler and more effective than what we're trying to do here. I'll describe the proposed solution in #547.

@alandefreitas alandefreitas deleted the ubuntu20-release branch June 24, 2024 23:09
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