Skip to content

Commit 52044d5

Browse files
committed
ref(ci): deno install in each job
1 parent d9fbb8b commit 52044d5

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ jobs:
6262
with:
6363
name: bench-build
6464
retention-days: 1
65-
path: |
66-
wasm.ts
67-
node_modules
65+
path: wasm.ts
6866

6967
simulation:
7068
name: Run benchmarks (simulation)
@@ -78,6 +76,11 @@ jobs:
7876
- name: Checkout
7977
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
8078

79+
- name: Setup Deno
80+
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2
81+
with:
82+
deno-version: v2.x
83+
8184
- name: Setup Node
8285
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
8386
with:
@@ -88,10 +91,22 @@ jobs:
8891
with:
8992
name: bench-build
9093

94+
- name: Restore dependencies
95+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
96+
id: deno-cache
97+
with:
98+
path: node_modules
99+
key: deno-${{ hashFiles('deno.lock') }}
100+
101+
- name: Install dependencies
102+
if: steps.deno-cache.outputs.cache-hit != 'true'
103+
run: deno install
104+
91105
- name: Run benchmarks
92106
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0
93107
with:
94108
mode: simulation
109+
# IMPORTANT! deno task bench fails in CI due to incompatible V8 bindings
95110
run: node bench/mod.ts
96111

97112
walltime:
@@ -106,6 +121,11 @@ jobs:
106121
- name: Checkout
107122
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
108123

124+
- name: Setup Deno
125+
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2
126+
with:
127+
deno-version: v2.x
128+
109129
- name: Setup Node
110130
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
111131
with:
@@ -116,6 +136,17 @@ jobs:
116136
with:
117137
name: bench-build
118138

139+
- name: Restore dependencies
140+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
141+
id: deno-cache
142+
with:
143+
path: node_modules
144+
key: deno-codspeed-${{ runner.arch }}-${{ hashFiles('deno.lock') }}
145+
146+
- name: Install dependencies
147+
if: steps.deno-cache.outputs.cache-hit != 'true'
148+
run: deno install
149+
119150
- name: Run process startup benchmarks
120151
uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0
121152
with:

deno.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"effection": "npm:effection@^4.0.2",
1818
"@std/encoding": "jsr:@std/encoding@1",
1919
"@codspeed/tinybench-plugin": "npm:@codspeed/tinybench-plugin@^5.4.0",
20-
"@codspeed/core": "npm:@codspeed/core@^5.4.0",
2120
"tinybench": "npm:tinybench@^5.0.0"
2221
},
2322
"exports": {

0 commit comments

Comments
 (0)