From 766a70c192852fe01c98d823cc2272bf6a93ed2c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 14 Sep 2024 01:17:56 +0200 Subject: [PATCH] ci(linux32): do make Javascript Actions work In 9c261856c91 (ci: use regular action versions for linux32 job, 2024-09-12), a hack was implemented to let the 32-bit container make use of the 64-bit node 20 provided by the Actions runner. This, however, runs the risk of using 64-bit executables when we specifically chose a Docker image that only contains 32-bit bits and pieces so that would not happen. Let's address this instead by overriding the amd64 version of node 20 with an x86 one (which is "officially unofficial" by virtue of being hosted on unofficial-builds.nodejs.org). This partially reverts 9c261856c91 (ci: use regular action versions for linux32 job, 2024-09-12), keeping the updates to Javascript Actions. Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fea981c96a175b..4ceebe1304adfb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,11 +40,19 @@ jobs: jobname: ${{matrix.vector.jobname}} distro: ${{matrix.vector.distro}} runs-on: ubuntu-latest - container: ${{matrix.vector.image}} + container: + image: ${{matrix.vector.image}} + volumes: + # override /__e/node20 on 32-bit because it is 64-bit + - /tmp:/__e${{matrix.vector.jobname != 'linux32' && '-x86' || ''}}/node20 steps: - - name: prepare libc6 for actions + - name: prepare x86 variant of node20 if: matrix.vector.jobname == 'linux32' - run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6 + run: | + apt -q update && apt -q -y install curl && + NODE_URL=https://unofficial-builds.nodejs.org/download/release/v20.17.0/node-v20.17.0-linux-x86.tar.gz && + curl -Lo /tmp/node.tar.gz $NODE_URL && + tar -C /__e/node20 -x --strip-components=1 -f /tmp/node.tar.gz - uses: actions/checkout@v4 - run: ci/install-dependencies.sh - run: ci/run-build-and-tests.sh