1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00

chore(ci): only install node for the benchmarks (#17371)

This commit is contained in:
David Sherret 2023-01-12 10:49:46 -05:00 committed by David Sherret
parent 9e5949fa52
commit 3d95d1c723
2 changed files with 17 additions and 7 deletions

14
.github/workflows/ci.generate.ts vendored Executable file → Normal file
View file

@ -323,7 +323,11 @@ const ci = {
...installDenoStep, ...installDenoStep,
}, },
...installPythonSteps, ...installPythonSteps,
installNodeStep, {
// only necessary for benchmarks
if: "matrix.job == 'bench'",
...installNodeStep,
},
authenticateWithGoogleCloud, authenticateWithGoogleCloud,
{ {
name: "Setup gcloud (unix)", name: "Setup gcloud (unix)",
@ -377,15 +381,19 @@ const ci = {
name: "Log versions", name: "Log versions",
shell: "bash", shell: "bash",
run: [ run: [
"node -v",
"python --version", "python --version",
"rustc --version", "rustc --version",
"cargo --version", "cargo --version",
"# Deno is installed when linting.", // Deno is installed when linting.
'if [ "${{ matrix.job }}" == "lint" ]', 'if [ "${{ matrix.job }}" == "lint" ]',
"then", "then",
" deno --version", " deno --version",
"fi", "fi",
// Node is installed for benchmarks.
'if [ "${{ matrix.job }}" == "bench" ]',
"then",
" node -v",
"fi",
].join("\n"), ].join("\n"),
}, },
{ {

View file

@ -120,11 +120,11 @@ jobs:
Where-Object { Test-Path "$_\python.exe" } | Where-Object { Test-Path "$_\python.exe" } |
Select-Object -Skip 1 | Select-Object -Skip 1 |
ForEach-Object { Move-Item "$_" "$_.disabled" } 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 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
- name: Authenticate with Google Cloud - name: Authenticate with Google Cloud
if: |- if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.profile == 'release' && !(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 - name: Log versions
shell: bash shell: bash
run: |- run: |-
node -v
python --version python --version
rustc --version rustc --version
cargo --version cargo --version
# Deno is installed when linting.
if [ "${{ matrix.job }}" == "lint" ] if [ "${{ matrix.job }}" == "lint" ]
then then
deno --version deno --version
fi 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'')' if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
- name: Cache Cargo home - name: Cache Cargo home
uses: actions/cache@v3 uses: actions/cache@v3