Skip to content

Commit

Permalink
Install 64-bit Node in container, for its libraries
Browse files Browse the repository at this point in the history
This is a workaround for a problem that is the same or similar to
actions/checkout#334:

    Run actions/checkout@v4
    /usr/bin/docker exec  a7f94cb30b99bd1ee851270fad4768421eddecd7e8fa674f56c4f2d2d64210b6 sh -c "cat /etc/*release | grep ^ID"
    exec /__e/node20/bin/node: no such file or directory

I had not originally noticed the `cat /etc/*release` part of that
output, and had surmised that this was a subtly different problem,
but it looks like it's probably exactly the same. The workaround in
actions/checkout#334 (comment)
is applied in this commit and seems to be working.

As noted there, the absence of some 64-bit libraries in 32-bit
containers prevents the (existing and already mapped) 64-bit
Node.js outside the container from being run, and installing 64-bit
Node.js in the container via `apt-get` (even though, in this case,
it is a different version) installs the needed dependencies,
letting the (existing) Node.js run.

(Other problems, related to `safe.directory` protections as well as
tests that are known to fail due to assertions about the size of
data structures that implicitly assume 64-bit targets, do still
prevent the job from succeeding. But `actions/checkout@v4`, which
was failing before, seems to be working, as do the other actions.)
  • Loading branch information
EliahKagan committed Nov 15, 2024
1 parent 089f6b0 commit 6f5a615
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ jobs:
steps:
- name: Prerequisites
run: |
dpkg --add-architecture amd64 # For 64-bit Node.js, for actions.
apt-get update
apt-get install --no-install-recommends -y build-essential ca-certificates cmake curl git jq libssl-dev nodejs pkgconf
#mkdir -p /__e/node20/bin
#ln -s /usr/bin/node /__e/node20/bin/node
file /__e/node20/bin/node
apt-get install --no-install-recommends -y build-essential ca-certificates cmake curl git jq libssl-dev nodejs:amd64 pkgconf
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
Expand Down

0 comments on commit 6f5a615

Please sign in to comment.