This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/ci/woodpecker/unlimited-matrix.patch

44 lines
1,019 B
Diff
Raw Normal View History

2023-04-12 07:12:24 +00:00
diff --git a/pipeline/frontend/yaml/matrix/matrix.go b/pipeline/frontend/yaml/matrix/matrix.go
index da5e9f24..c3fe9896 100644
2023-04-12 07:12:24 +00:00
--- a/pipeline/frontend/yaml/matrix/matrix.go
+++ b/pipeline/frontend/yaml/matrix/matrix.go
@@ -22,11 +22,6 @@ import (
"gopkg.in/yaml.v3"
)
-const (
- limitTags = 10
- limitAxis = 25
-)
-
// Matrix represents the pipeline matrix.
type Matrix map[string][]string
@@ -87,25 +82,15 @@ func calc(matrix Matrix) []Axis {
for p := 0; p < perm; p++ {
axis := map[string]string{}
decr := perm
- for i, tag := range tags {
+ for _, tag := range tags {
elems := matrix[tag]
2023-04-12 07:12:24 +00:00
decr = decr / len(elems)
elem := p / decr % len(elems)
axis[tag] = elems[elem]
-
- // enforce a maximum number of tags in the pipeline matrix.
- if i > limitTags {
- break
- }
}
// append to the list of axis.
axisList = append(axisList, axis)
-
- // enforce a maximum number of axis that should be calculated.
- if p > limitAxis {
- break
- }
}
return axisList