Skip to content

Commit

Permalink
Merge branch 'master' into docs_for1.3.1_master
Browse files Browse the repository at this point in the history
  • Loading branch information
Unireverse authored Oct 23, 2024
2 parents 9643c3c + 1237d85 commit 5740e89
Show file tree
Hide file tree
Showing 309 changed files with 4,166 additions and 3,876 deletions.
46 changes: 0 additions & 46 deletions .github/ci_script/combine_log.py

This file was deleted.

32 changes: 0 additions & 32 deletions .github/ci_script/file_guard.py

This file was deleted.

77 changes: 0 additions & 77 deletions .github/ci_script/mlu-ops-all_system_test_script.sh

This file was deleted.

93 changes: 0 additions & 93 deletions .github/ci_script/mlu-ops-ci_script.sh

This file was deleted.

20 changes: 20 additions & 0 deletions .github/scripts/invoke_ci_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /bin/bash
# get PR id
github_ref=$(echo $GITHUB_REF | grep -Eo "/[0-9]*/")
pr_id=(${github_ref//// })

# generate time stamp
current_time=`date "+%Y-%m-%d %H:%M:%S"`
timestamp_string=`date -d "${current_time}" +%s`
current_timestamp=$((timestamp_string*1000+10#`date "+%N"`/1000000))

# temporally set to mlu370
card_type="MLU370-S4"

# default repo name
repo_name="mlu-ops"

github_user=${GITHUB_ACTOR}

# start script
python3 .github/scripts/run_ci_test.py ${repo_name} ${github_user} ${pr_id} ${current_timestamp}
60 changes: 60 additions & 0 deletions .github/scripts/run_ci_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import requests
import json
import time
import sys

local_communication_port = 12547

params = sys.argv
try:
if len(params) == 5:
repo = params[1]
user = params[2]
pr_id = params[3]
timestamp = params[4]
elif len(params) == 4:
repo = params[1]
user = params[2]
pr_id = ""
timestamp = params[3]
else:
print("Got some wrong with input params. Test fail.")
exit(-1)
except Exception as e:
print("Got some wrong with input params. Test fail.")
exit(-1)

json_obj = {
"timestamp": timestamp,
"repo": repo,
"pr_id": pr_id,
"trigger_type": "ci",
"trigger_id": user,
"repeat_times": "3",
"status": "running"
}
local_test_server = "http://localhost:" + str(local_communication_port)

# invoke test
response = requests.post(local_test_server, json=json_obj)
# get internal id
task_obj = json.loads(response.text)

try:
while 1:
response = requests.get(local_test_server + "/aiming=get_status&id=" + task_obj["id"])
result = json.loads(response.text)
if "success" in result["status"] or "fail" in result["status"] or "error" in result["status"] or "stable" in result["status"]:
print(result["log"])
print(result["status"])
response = requests.get(local_test_server + "/aiming=end_job&id=" + task_obj["id"])
if "success" in result["status"]:
exit(0)
else:
exit(-1)
break
time.sleep(10)
except Exception as e:
print(e)
print("Got internal error while invoking test. Since we can not reboot this test, you should rerun this test in github.")
exit(-1)
59 changes: 0 additions & 59 deletions .github/workflows/mluops_all_system_ci.discard

This file was deleted.

Loading

0 comments on commit 5740e89

Please sign in to comment.