diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-01-12 10:49:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 10:49:46 -0500 |
commit | dabcdf23241f4cf19806c53e4122a32e9b25bee3 (patch) | |
tree | 5ccdc0ec056b7209c96ff41483f93bd06c0c9053 | |
parent | 1776dca6c784ac399a4414c01ea737171558f809 (diff) |
chore(ci): only install node for the benchmarks (#17371)
-rw-r--r--[-rwxr-xr-x] | .github/workflows/ci.generate.ts | 14 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 10 |
2 files changed, 17 insertions, 7 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index b5d186164..5f981dec4 100755..100644 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -323,7 +323,11 @@ const ci = { ...installDenoStep, }, ...installPythonSteps, - installNodeStep, + { + // only necessary for benchmarks + if: "matrix.job == 'bench'", + ...installNodeStep, + }, authenticateWithGoogleCloud, { name: "Setup gcloud (unix)", @@ -377,15 +381,19 @@ const ci = { name: "Log versions", shell: "bash", run: [ - "node -v", "python --version", "rustc --version", "cargo --version", - "# Deno is installed when linting.", + // Deno is installed when linting. 'if [ "${{ matrix.job }}" == "lint" ]', "then", " deno --version", "fi", + // Node is installed for benchmarks. + 'if [ "${{ matrix.job }}" == "bench" ]', + "then", + " node -v", + "fi", ].join("\n"), }, { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d9bf48e3..0f5506335 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,11 +120,11 @@ jobs: Where-Object { Test-Path "$_\python.exe" } | Select-Object -Skip 1 | ForEach-Object { Move-Item "$_" "$_.disabled" } - - name: Install Node + - if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''bench''))' + name: Install Node uses: actions/setup-node@v3 with: node-version: 18 - if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')' - name: Authenticate with Google Cloud if: |- !(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.profile == 'release' && @@ -234,15 +234,17 @@ jobs: - name: Log versions shell: bash run: |- - node -v python --version rustc --version cargo --version - # Deno is installed when linting. if [ "${{ matrix.job }}" == "lint" ] then deno --version fi + if [ "${{ matrix.job }}" == "bench" ] + then + node -v + fi if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')' - name: Cache Cargo home uses: actions/cache@v3 |