diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-16 05:22:30 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-16 05:22:30 +0000 |
| commit | a1f523dd2c2f50c434d750f4957fc1825ea1753e (patch) | |
| tree | d79a686c4d2bc3b3def6b1a8ccb2a19a4ddc463b /src/ci/scripts | |
| parent | 20f418252f2a207abca10a83ed2b04cb0b7aa57c (diff) | |
| parent | 6288a721f5ea59a59b4304a7b70c92d7755e8aa8 (diff) | |
| download | rust-a1f523dd2c2f50c434d750f4957fc1825ea1753e.tar.gz rust-a1f523dd2c2f50c434d750f4957fc1825ea1753e.zip | |
Merge from rustc
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/calculate-job-matrix.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ci/scripts/calculate-job-matrix.py b/src/ci/scripts/calculate-job-matrix.py new file mode 100755 index 00000000000..9b1e74c23c3 --- /dev/null +++ b/src/ci/scripts/calculate-job-matrix.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +""" +This script serves for generating a matrix of jobs that should +be executed on CI. + +It reads job definitions from `src/ci/github-actions/jobs.yml` +and filters them based on the event that happened on CI. + +Currently, it only supports PR builds. +""" + +import json +from pathlib import Path + +import yaml + +JOBS_YAML_PATH = Path(__file__).absolute().parent.parent / "github-actions" / "jobs.yml" + + +if __name__ == "__main__": + with open(JOBS_YAML_PATH) as f: + jobs = yaml.safe_load(f) + job_output = jobs["pr"] + print(f"jobs={json.dumps(job_output)}") |
