Skip to content

Commit

Permalink
fix: logic to ignore entire suite in matrix build
Browse files Browse the repository at this point in the history
My python skills "Rusty"
  • Loading branch information
SaicharanKandukuri committed Dec 18, 2024
1 parent db6ad3d commit 5f7515d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions gen_data/gen-suite-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import glob
import os

SUITES_DIR="./suites/*"
SUITES_DIR="./suites"

# ARCHITECTURE CAN BE: amd64, arm64, armhf
# it has high priority over the architecture specified in the suite
Expand All @@ -15,11 +15,14 @@ def generate_matrix_json() -> str:
json_data = { "include": [ ] }

for arch in ARCHITECTURES:
for variantPath in glob.iglob(f"{SUITES_DIR}/*", recursive=False):
for variantPath in glob.iglob(f"{SUITES_DIR}/*/*", recursive=False):
suiteName = variantPath.split('/')[2]
variantName = variantPath.split('/')[3]

if os.path.exists(f"{variantPath}/.no-matrix-build") or os.path.exists(f"{SUITES_DIR}/{suiteName}/.no-matrix-build"):

if os.path.exists(f"{SUITES_DIR}/{suiteName}/.no-matrix-build"):
continue

if os.path.exists(f"{variantPath}/.no-matrix-build"):
continue

element = { }
Expand Down

0 comments on commit 5f7515d

Please sign in to comment.