Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
51 changes: 51 additions & 0 deletions .github/scripts/run_ci_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import requests
import json
import time
import sys

local_communication_port = 12547

params = sys.argv
try:
repo = params[1]
user = params[2]
pr_id = params[3]
timestamp = params[4]
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.

2 changes: 1 addition & 1 deletion .github/workflows/mluops_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:

- name: run_mlu_ops_ci
run: >
bash .github/ci_script/mlu-ops-ci_script.sh
bash .github/scripts/invoke_ci_test.sh