Skip to content

Commit 5c6ab71

Browse files
richardlautargos
authored andcommitted
build: shorten path used in tarball build workflow
Shorten the path to the workspace for the GitHub Actions `build-tarball` workflow to avoid `execvp: printf: Argument list too long` errors from `make`. GitHub currently runs workflows in a `/home/runner/work/my-repo/my-repo` directory where `my-repo` is the repository name and is repeated twice (the second is from the git checkout). Some of the command lines in the Node.js build, e.g. the `ar` command to create static libraries, pass several fully qualified paths to filenames so the workflow directory is repeat many times. The most recent V8 update added more files to the command and has now tipped the command line length over the maximum allowed when using forks of the `node` repository with a longer name (e.g. `node-auto-test` and the private fork used to prepare security releases). Use GitHub's `RUNNER_TEMP` environment variable to extract the source tarball into the temporary directory on the GitHub runner. This is currently `/home/runner/work/_temp` and is not dependent on the name of the repository. PR-URL: #39192 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 31163ed commit 5c6ab71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build-tarball.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ jobs:
5757
name: tarballs
5858
- name: Extract tarball
5959
run: |
60-
tar xzf tarballs/*.tar.gz
61-
echo "TAR_DIR=`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
60+
tar xzf tarballs/*.tar.gz -C $RUNNER_TEMP
61+
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
6262
- name: Copy directories needed for testing
6363
run: |
6464
cp -r tools/node_modules $TAR_DIR/tools

0 commit comments

Comments
 (0)