From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH] ci(linux32): make Javascript Actions work in x86 mode
Date: Sat, 14 Sep 2024 00:42:39 +0000 [thread overview]
Message-ID: <pull.1790.git.1726274559928.gitgitgadget@gmail.com> (raw)
From: Johannes Schindelin <johannes.schindelin@gmx.de>
In February 2023, older `actions/upload-artifact` were deprecated:
https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/
This was recently followed by brown-outs.
However, the `linux32` job relied on those, as there are well-documented
problems (see https://github.com/actions/runner/issues/2115 for example)
running modern, Javascript-based Actions in 32-bit only containers.
To get the CI builds to work again, a work-around was implemented in
https://lore.kernel.org/git/20240912094841.GD589828@coredump.intra.peff.net
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
purposefully chose a Docker image that only contains 32-bit bits and
pieces so that accidental use of 64-bit libraries or executables would
not happen.
Let's go about this the other way round instead, by overriding the amd64
version of node 20 the Actions runner provides 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` before these Actions
became Javascript-based Actions.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
ci(linux32): do make Javascript Actions work
I propose this alternative to 9c261856c91 (ci: use regular action
versions for linux32 job, 2024-09-12), keeping the updates to Javascript
Actions.
The benefit is that it keeps the 32-bit container used in the linux32
job clean of any 64-bit libraries so that we don't accidentally end up
testing 64-bit stuff without wanting it.
For good measure, I also reported this problem with that deprecation at
https://github.com/actions/upload-artifact/issues/616 even though I know
that the GitHub Actions team saw a headcount-losing reorg recently and
therefore I do not really expect that they have any bandwidth to help
with this. So this work-around is the best we can do for now, I believe.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1790%2Fdscho%2Fuse-x86-node-in-linux32-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1790/dscho/use-x86-node-in-linux32-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1790
.github/workflows/main.yml | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 97f9b063109..25a5f5f0e29 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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}}
base-commit: 87dc3914693da5febad427161fc6bdfeed3426c7
--
gitgitgadget
next reply other threads:[~2024-09-14 0:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 0:42 Johannes Schindelin via GitGitGadget [this message]
2024-09-14 7:29 ` [PATCH] ci(linux32): make Javascript Actions work in x86 mode Jeff King
2024-09-14 17:17 ` Junio C Hamano
2024-09-15 11:07 ` Jeff King
2024-09-15 16:25 ` Junio C Hamano
2024-09-17 12:20 ` Johannes Schindelin
2024-09-17 15:01 ` Junio C Hamano
2024-09-19 7:05 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1790.git.1726274559928.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox