Skip to content

Commit

Permalink
ci(linux32): do make Javascript Actions work
Browse files Browse the repository at this point in the history
In 9c26185 (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 allows us to stop using the now-deprecated versions of
`actions/checkout` and `actions/upload-artifact` from before they became
Javascript-based Actions.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Sep 14, 2024
1 parent 87dc391 commit d13c959
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,27 @@ 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:
- uses: actions/checkout@v4
if: matrix.vector.jobname != 'linux32'
- uses: actions/checkout@v1 # cannot be upgraded because Node.js Actions aren't supported in this container
- name: prepare x86 variant of node20
if: matrix.vector.jobname == 'linux32'
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
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
run: ci/print-test-failures.sh
- name: Upload failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32'
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v4
with:
name: failed-tests-${{matrix.vector.jobname}}
Expand Down

0 comments on commit d13c959

Please sign in to comment.