Skip to content

Commit

Permalink
build: shorten path used in tarball build workflow
Browse files Browse the repository at this point in the history
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 <technicalcute@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
richardlau authored and targos committed Jul 11, 2021
1 parent 04bcfcf commit 3ed0499
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
name: tarballs
- name: Extract tarball
run: |
tar xzf tarballs/*.tar.gz
echo "TAR_DIR=`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
tar xzf tarballs/*.tar.gz -C $RUNNER_TEMP
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
- name: Copy directories needed for testing
run: |
cp -r tools/node_modules $TAR_DIR/tools
Expand Down

0 comments on commit 3ed0499

Please sign in to comment.