Skip to content

Commit aacec1f

Browse files
committed
Optimize tools installation
1 parent 6b43ed9 commit aacec1f

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
@@ -136,13 +136,14 @@ jobs:
136136
137137
- name: Cache Fortio binary
138138
id: cache-fortio
139+
if: contains(env.TOOLS, 'fortio')
139140
uses: actions/cache@v4
140141
with:
141142
path: ~/bin/fortio
142143
key: fortio-${{ runner.os }}-${{ runner.arch }}-${{ env.FORTIO_VERSION }}
143144

144145
- name: Install Fortio
145-
if: steps.cache-fortio.outputs.cache-hit != 'true'
146+
if: contains(env.TOOLS, 'fortio') && steps.cache-fortio.outputs.cache-hit != 'true'
146147
run: |
147148
echo "📦 Installing Fortio v${FORTIO_VERSION}"
148149
@@ -155,13 +156,14 @@ jobs:
155156
156157
- name: Cache Vegeta binary
157158
id: cache-vegeta
159+
if: contains(env.TOOLS, 'vegeta')
158160
uses: actions/cache@v4
159161
with:
160162
path: ~/bin/vegeta
161163
key: vegeta-${{ runner.os }}-${{ runner.arch }}-${{ env.VEGETA_VERSION }}
162164

163165
- name: Install Vegeta
164-
if: steps.cache-vegeta.outputs.cache-hit != 'true'
166+
if: contains(env.TOOLS, 'vegeta') && steps.cache-vegeta.outputs.cache-hit != 'true'
165167
run: |
166168
echo "📦 Installing Vegeta v${VEGETA_VERSION}"
167169
@@ -173,6 +175,7 @@ jobs:
173175
mv vegeta ~/bin/
174176
175177
- name: Setup k6
178+
if: contains(env.TOOLS, 'k6')
176179
uses: grafana/setup-k6-action@v1
177180
with:
178181
k6-version: ${{ env.K6_VERSION }}

0 commit comments

Comments
 (0)