@@ -20,16 +20,25 @@ jobs:
2020 name : Discover A/B environments
2121 runs-on : ubuntu-latest
2222 steps :
23- - uses : actions/checkout@v2
23+ - name : Checkout
24+ uses : actions/checkout@v2
2425 with :
2526 fetch-depth : 0
26- - uses : actions/setup-python@v4
27+
28+ - name : Install Python
29+ uses : actions/setup-python@v4
2730 with :
2831 python-version : ' 3.10'
29- - id : set-matrix
32+
33+ - name : Install dependencies
34+ run : pip install PyYaml
35+
36+ - name : Generate dynamic matrix
37+ id : set-matrix
3038 run : echo "::set-output name=matrix::$(python ci/scripts/discover_ab_environments.py)"
39+
3140 outputs :
32- matrix : ${{ steps.set-matrix.outputs.matrix }}
41+ matrix : ${{ steps.set-matrix.outputs.matrix }}
3342
3443 # Everything below this point runs iff there are files matching
3544 # AB_environments/AB_*.conda.yaml
@@ -39,15 +48,16 @@ jobs:
3948 name : Setup
4049 runs-on : ubuntu-latest
4150 needs : discover_ab_envs
42- if : ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
51+ if : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
4352 strategy :
4453 fail-fast : false
4554 matrix :
4655 python-version : ["3.9"]
47- runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
56+ runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
4857
4958 steps :
50- - uses : actions/checkout@v2
59+ - name : Checkout
60+ uses : actions/checkout@v2
5161 with :
5262 fetch-depth : 0
5363
@@ -111,10 +121,12 @@ jobs:
111121 matrix :
112122 os : [ubuntu-latest]
113123 python-version : ["3.9"]
114- runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
124+ runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
125+ repeat : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).repeat }}
115126
116127 steps :
117- - uses : actions/checkout@v2
128+ - name : Checkout
129+ uses : actions/checkout@v2
118130 with :
119131 fetch-depth : 0
120132
@@ -153,8 +165,8 @@ jobs:
153165 uses : actions/upload-artifact@v3
154166 if : always()
155167 with :
156- name : runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}
157- path : runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db
168+ name : runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-${{ matrix.repeat }}- py${{ matrix.python-version }}
169+ path : runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-${{ matrix.repeat }}- py${{ matrix.python-version }}.db
158170
159171 benchmarks :
160172 name : Benchmarks - ${{ matrix.os }}, Python ${{ matrix.python-version }}, Runtime ${{ matrix.runtime-version }}
@@ -166,10 +178,12 @@ jobs:
166178 matrix :
167179 os : [ubuntu-latest]
168180 python-version : ["3.9"]
169- runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
181+ runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
182+ repeat : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).repeat }}
170183
171184 steps :
172- - uses : actions/checkout@v2
185+ - name : Checkout
186+ uses : actions/checkout@v2
173187 with :
174188 fetch-depth : 0
175189
@@ -207,8 +221,8 @@ jobs:
207221 uses : actions/upload-artifact@v3
208222 if : always()
209223 with :
210- name : benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}
211- path : benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db
224+ name : benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-${{ matrix.repeat }}- py${{ matrix.python-version }}
225+ path : benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-${{ matrix.repeat }}- py${{ matrix.python-version }}.db
212226
213227 stability :
214228 name : Stability - ${{ matrix.os }}, Python ${{ matrix.python-version }}, Runtime ${{ matrix.runtime-version }}
@@ -220,10 +234,12 @@ jobs:
220234 matrix :
221235 os : [ubuntu-latest]
222236 python-version : ["3.9"]
223- runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
237+ runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
238+ repeat : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).repeat }}
224239
225240 steps :
226- - uses : actions/checkout@v2
241+ - name : Checkout
242+ uses : actions/checkout@v2
227243 with :
228244 fetch-depth : 0
229245
@@ -263,22 +279,23 @@ jobs:
263279 uses : actions/upload-artifact@v3
264280 if : always()
265281 with :
266- name : stability-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}
267- path : stability-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db
282+ name : stability-${{ matrix.os }}-${{ matrix.runtime-version }}-${{ matrix.repeat }}- py${{ matrix.python-version }}
283+ path : stability-${{ matrix.os }}-${{ matrix.runtime-version }}-${{ matrix.repeat }}- py${{ matrix.python-version }}.db
268284
269285 cleanup :
270286 needs : [discover_ab_envs, software, runtime, benchmarks, stability]
271- if : always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
287+ if : always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
272288 name : Cleanup
273289 runs-on : ubuntu-latest
274290 strategy :
275291 fail-fast : false
276292 matrix :
277293 python-version : ["3.9"]
278- runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
294+ runtime-version : ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
279295
280296 steps :
281- - uses : actions/checkout@v2
297+ - name : Checkout
298+ uses : actions/checkout@v2
282299
283300 - name : Set up Python
284301 uses : actions/setup-python@v4
@@ -304,22 +321,25 @@ jobs:
304321 process-results :
305322 needs : [discover_ab_envs, runtime, benchmarks, stability]
306323 name : Combine separate benchmark results
307- if : always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
324+ if : always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
308325 runs-on : ubuntu-latest
309326 concurrency :
310327 # Fairly strict concurrency rule to avoid stepping on benchmark db.
311328 # Could eventually replace with a real db in coiled, RDS, or litestream
312329 group : process-benchmarks
313330 cancel-in-progress : false
314331 steps :
315- - uses : actions/checkout@v2
332+ - name : Checkout
333+ uses : actions/checkout@v2
316334
317- - uses : actions/setup-python@v4
335+ - name : Install Python
336+ uses : actions/setup-python@v4
318337
319338 - name : Install dependencies
320339 run : pip install alembic
321340
322- - uses : actions/download-artifact@v3
341+ - name : Download artifacts
342+ uses : actions/download-artifact@v3
323343 with :
324344 path : benchmarks
325345
@@ -337,15 +357,17 @@ jobs:
337357 static-site :
338358 needs : [discover_ab_envs, process-results]
339359 # Always generate the site, as this can be skipped even if an indirect dependency fails (like a test run)
340- if : always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }}
360+ if : always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix).runtime }}
341361 name : Build static dashboards
342362 runs-on : ubuntu-latest
343363 steps :
344- - uses : actions/checkout@v2
364+ - name : Checkout
365+ uses : actions/checkout@v2
345366 with :
346367 fetch-depth : 0
347368
348- - uses : actions/download-artifact@v3
369+ - name : Download artifacts
370+ uses : actions/download-artifact@v3
349371 with :
350372 name : benchmark.db
351373
0 commit comments