File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 1616CI_TARGETS_YAML = "ci-targets.yaml"
1717CI_RUNNERS_YAML = "ci-runners.yaml"
1818CI_EXTRA_SKIP_LABELS = ["documentation" ]
19+ CI_MATRIX_SIZE_LIMIT = 256 # The maximum size of a matrix in GitHub Actions
1920
2021
2122def meets_conditional_version (version : str , min_version : str ) -> bool :
@@ -246,14 +247,19 @@ def main() -> None:
246247 if runner_config .get ("free" )
247248 }
248249
249- matrix = {
250- "include" : generate_matrix_entries (
251- config ,
252- runners ,
253- args .platform ,
254- labels ,
255- )
256- }
250+ entries = generate_matrix_entries (
251+ config ,
252+ runners ,
253+ args .platform ,
254+ labels ,
255+ )
256+
257+ matrix = {}
258+ shards = len (entries ) // CI_MATRIX_SIZE_LIMIT
259+ for shard in shards :
260+ matrix [str (shard )] = entries [
261+ shard * CI_MATRIX_SIZE_LIMIT : (shard + 1 ) * CI_MATRIX_SIZE_LIMIT
262+ ]
257263
258264 print (json .dumps (matrix ))
259265
You can’t perform that action at this time.
0 commit comments