question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CI, base (binary compatibility), multi-arch discussions

See original GitHub issue

cc: @robertsLando @leerob

It is much trickier to set up CI for this repo, because:

  • Binary compatibility is affected by the build base (e.g. binaries compiled on 20.04 can not run on 18.04, Ubuntu vs. EL vs. etc.).
  • Node.js is a huge program, and we have to compile multiple versions. It is easy to hit limits of Github Actions.
  • We want to compile binaries for different architectures. That usually requires cross-compilation, which is more complicated. It is also possible to compile with native toolchain under emulation, but emulation is very inefficient.
  • Others…

For build base:

I think rhscl/devtoolset-10-toolchain-rhel7 is a great choice. It is RedHat’s certified/official GCC 10 toolchain for Enterprise Linux 7. Compiled binaries are compatible with glibc 2.17 and later. This allows the compiled binaries to run on Ubuntu 14.04+, EL7+ and most other distros. Plus, RedHat’s toolchain is production-grade.

However, RedHat do not provide certified cross toolchains, and only EL8+ supports arm64. Ubuntu does provide official cross toolchains. I think we can use Ubuntu 18.04 as base to compile binaries for architectures other than amd64.


For workflow:

Each Node.js build takes approx. 1 hour.

At minimum, we have to support Active LTS and 1 maintenance LTS. Optimally, we want to support all maintained versions (Current, Active LTS, maintenance LTSs) and at least 1 recently deprecated LTS.

There are at least three platforms (linux, macos and windows) and at least two architectures (x64 and arm64). Additional platforms may include linuxstatic and alpine. Additional architectures may include armv7 and x86.

So, minimum case: 2 (Node.js versions) * 3 (platforms) * 2 (architectures) = 12 builds. worst case: 5 * 5 * 4 - 10 (no armv7/x86 for macOS) - 15 (no x86 for Linux platforms) = 75 builds.

Either way, it is impossible to run full CI frequently, unless you want to get an “excessive usage” email (or bill) from Github (well, idk if they really care, though).

I think we should use workflow_dispatch event, so CI is triggered manually only. We should also try to split jobs of different versions/platforms/archs, so we can choose to rebuild only the necessary ones.


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
leerobcommented, Mar 31, 2021

image Added secrets for RHEL for GitHub Actions CI environment.

0reactions
robertsLandocommented, Apr 1, 2021

Well done @jesec ! BTW yeah I think that zip executable or compressed file system could be a way

Read more comments on GitHub >

github_iconTop Results From Across the Web

compress files in virtual file system (#885) #1115 - vercel/pkg
CI, base (binary compatibility), multi-arch discussions vercel/pkg-fetch#124 ... However since the binary found at /proc/self/exe is the compressed version, ...
Read more >
Building Multi-Arch Images for Arm and x86 with Docker Desktop
This fast and lightweight container OS comes packaged with the QEMU emulator, and comes pre-configured with binfmt_misc to run binaries of any ...
Read more >
Building Multi-Architecture Docker Images With Buildx - Medium
How to create your own Docker images that run on multiple CPU architectures.
Read more >
Resolving Issue #1949 (how to build Elm) with improved ...
The current compiler/installers/linux/Dockerfile successfully builds a static elm binary. I've tried to improve upon this base in three ...
Read more >
Multi-Arch Layered Image Build System - Fedora
Base Image vs Layered Image ... Why Multi-Arch Containers? ... Initial discussions estimated about four weeks of work to deploy a new service...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found