Skip to content

Commit

Permalink
[Feature](mlu-ops): New CI v2
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchengwei committed Jul 26, 2024
1 parent e34307d commit 34a44ee
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 281 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.

55 changes: 55 additions & 0 deletions .github/ci_script/invoke_jenkins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import os
import json
import requests
import sys
import time

if len(sys.argv) < 3:
print("Need extra input parameters.")
exit(-1)

localhost = "http://localhost:12345/"


os_version = "ubuntu20.04"
require_test = True
card_type = 0
pr_id = 0


for pair in sys.argv[1:-1]:
print(pair)
key, value = pair.split("=")
if key == "os":
os_version = value
if key == "require_test":
require_test = bool(value)
if key == "card_type":
card_type = int(value)
if key == "pr_id":
pr_id == value
exit()
timestamp = str(int(time.time() * 10000))

test_infos = {
"system_os": os_version,
"type": "ci",
"pr_id": pr_id,
"timestamp": timestamp,
"require_test": require_test
}

response = requests.post(localhost, json=test_infos)

if response.status_code == 200:
while 1:
response = requests.get(localhost + "?type=10&pr_id=" + str(pr_id) + "&timestamp=" + timestamp + "&system_os=" + system_version)
if int(json.loads(response.text)["status"]) < 200:
time.sleep(3)
continue
if int(json.loads(response.text)["status"]) == 200:
print("success")
exit(0)
if int(json.loads(response.text)["status"]) == 300:
print(json.loads(response.text)["log"])
exit(-1)
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.

14 changes: 2 additions & 12 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ jobs:
with:
submodules: 'true'

- name: bangc_lint_check
- name: run
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:v0.2-x86_64-ubuntu16.04-BANGPy
./tools/pre-commit origin/master
- name: build_mlu_ops
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-ubuntu20.04-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
./build.sh
- name: clean
run: |
rm -rf build
echo "success"
23 changes: 3 additions & 20 deletions .github/workflows/mluops_all_system_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,14 @@ jobs:
test:
strategy:
matrix:
runner: [mlu370-m8]
mlu_ops_version : [1.2.0]
cntoolkit_version : [3.8.4]
cnnl_version: [1.23.2]
os: [ubuntu20.04, centos7, centos8, kylin10]
runs-on: ${{matrix.runner}}
runs-on: [yellow]
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'

- name: pull_images
run: |
docker pull docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
- name: build_mlu_ops
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
./build.sh
- name: mlu_ops_version_check
- name: run_mlu_ops_ci
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
bash version_check.sh ${{matrix.mlu_ops_version}}
- name: clean
run: |
rm -rf build
echo "success"
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
python ci_script/invoke_jenkins.py os=ubuntu20.04 require_test=True card_type=0 pr_id=$(echo $GITHUB_REF | grep -Eo "/[0-9]*/")

0 comments on commit 34a44ee

Please sign in to comment.