Skip to content

Commit

Permalink
chore(ci): only install node for the benchmarks (denoland#17371)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jan 12, 2023
1 parent 1776dca commit dabcdf2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.generate.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ const ci = {
...installDenoStep,
},
...installPythonSteps,
installNodeStep,
{
// only necessary for benchmarks
if: "matrix.job == 'bench'",
...installNodeStep,
},
authenticateWithGoogleCloud,
{
name: "Setup gcloud (unix)",
Expand Down Expand Up @@ -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"),
},
{
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' &&
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dabcdf2

Please sign in to comment.