Skip to content

Commit 88dc86e

Browse files
committed
Optimize tools installation
1 parent 40029fa commit 88dc86e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/benchmark.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,14 @@ jobs:
141141
142142
- name: Cache Fortio binary
143143
id: cache-fortio
144+
if: contains(env.TOOLS, 'fortio')
144145
uses: actions/cache@v4
145146
with:
146147
path: ~/bin/fortio
147148
key: fortio-${{ runner.os }}-${{ runner.arch }}-${{ env.FORTIO_VERSION }}
148149

149150
- name: Install Fortio
150-
if: steps.cache-fortio.outputs.cache-hit != 'true'
151+
if: contains(env.TOOLS, 'fortio') && steps.cache-fortio.outputs.cache-hit != 'true'
151152
run: |
152153
echo "📦 Installing Fortio v${FORTIO_VERSION}"
153154
@@ -160,13 +161,14 @@ jobs:
160161
161162
- name: Cache Vegeta binary
162163
id: cache-vegeta
164+
if: contains(env.TOOLS, 'vegeta')
163165
uses: actions/cache@v4
164166
with:
165167
path: ~/bin/vegeta
166168
key: vegeta-${{ runner.os }}-${{ runner.arch }}-${{ env.VEGETA_VERSION }}
167169

168170
- name: Install Vegeta
169-
if: steps.cache-vegeta.outputs.cache-hit != 'true'
171+
if: contains(env.TOOLS, 'vegeta') && steps.cache-vegeta.outputs.cache-hit != 'true'
170172
run: |
171173
echo "📦 Installing Vegeta v${VEGETA_VERSION}"
172174
@@ -178,6 +180,7 @@ jobs:
178180
mv vegeta ~/bin/
179181
180182
- name: Setup k6
183+
if: contains(env.TOOLS, 'k6')
181184
uses: grafana/setup-k6-action@v1
182185
with:
183186
k6-version: ${{ env.K6_VERSION }}

0 commit comments

Comments
 (0)