CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
48 lines
1.2 KiB
Python
Executable File
48 lines
1.2 KiB
Python
Executable File
# Copyright Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
"""
|
|
This script determines the job status for different job runs
|
|
as part of GitHub workflow based on RUN_ID and ATTEMPT
|
|
|
|
Required environment variables:
|
|
- RUN_ID
|
|
- ATTEMPT
|
|
"""
|
|
|
|
import json
|
|
import os
|
|
from urllib.request import urlopen, Request
|
|
import logging
|
|
|
|
from github_actions_api import *
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
RUN_ID = os.getenv("RUN_ID")
|
|
ATTEMPT = os.getenv("ATTEMPT")
|
|
|
|
# Check for missing values
|
|
if not RUN_ID or not ATTEMPT:
|
|
raise ValueError(
|
|
f"Missing required environment variable RUN_ID or ATTEMPT. "
|
|
f"Ensure these are exported or set in the CI environment."
|
|
)
|
|
|
|
|
|
def run():
|
|
github_workflow_jobs_url = f"https://api.github.com/repos/ROCm/TheRock/actions/runs/{RUN_ID}/attempts/{ATTEMPT}/jobs"
|
|
|
|
job_data = gha_send_request(github_workflow_jobs_url)
|
|
|
|
# Check if API output shows number of jobs run in the workflow to be atleast 1
|
|
if not job_data.get("jobs"):
|
|
raise Exception("No jobs found in the GitHub workflow run.")
|
|
|
|
# Output the job summary JSON string directly to stdout
|
|
print(json.dumps(job_data))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run()
|