CI, base (binary compatibility), multi-arch discussions
See original GitHub issuecc: @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:
- Created 2 years ago
- Comments:5 (1 by maintainers)
CI
environment.Well done @jesec ! BTW yeah I think that zip executable or compressed file system could be a way