[Fix] Fix CI running condition for lite. (#172)

* .

* fix

* .

* .

* fix

* fix

* fix
This commit is contained in:
Wei Fu 2025-07-12 14:47:56 +08:00 committed by GitHub
parent 8d4b8dc90f
commit c5f023571e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,8 @@
name: Test AReaLite
on:
push:
pull_request:
branches: [ lite ]
paths:
- .github/workflows/test-arealite.yml
- arealite/**
@ -20,11 +21,12 @@ jobs:
env:
GIT_REPO_URL: https://github.bibk.top/${{ github.repository }}
GIT_COMMIT_SHA: ${{ github.sha }}
CI_NODE_SUDO_PW: ${{ secrets.CI_NODE_SUDO_PW }}
with:
host: ${{ secrets.CI_NODE_ADDR }}
username: ${{ secrets.CI_NODE_USER }}
key: ${{ secrets.REMOTE_SSH_KEY }}
envs: GIT_REPO_URL,GIT_COMMIT_SHA
envs: GIT_REPO_URL,GIT_COMMIT_SHA,CI_NODE_SUDO_PW
script_path: ci/clone_repo.sh
- uses: appleboy/ssh-action@v1

View File

@ -26,6 +26,8 @@ if not os.path.exists(MODEL_PATH):
PORT = 13887
DIST_PORT = 15887
HOST = network.gethostip()
# set a large timeout since we may need to download the model from hub
RUN_SERVER_TIMEOUT = 180
def check_server_health(base_url):
@ -65,11 +67,11 @@ def sglang_server():
)
base_url = f"http://{HOST}:{PORT}"
tik = time.time()
while time.time() - tik < 90:
while time.time() - tik < RUN_SERVER_TIMEOUT:
if check_server_health(base_url):
break
time.sleep(1)
if time.time() - tik > 90:
if time.time() - tik > RUN_SERVER_TIMEOUT:
raise RuntimeError("server launch failed")
yield
process.terminate()

View File

@ -9,7 +9,7 @@ echo "GIT_REPO_URL: $GIT_REPO_URL"
echo "GIT_COMMIT_SHA: $GIT_COMMIT_SHA"
RUN_ID="areal-$GIT_COMMIT_SHA"
rm -rf "/tmp/$RUN_ID"
echo ${CI_NODE_SUDO_PW} | sudo -S rm -rf "/tmp/$RUN_ID"
mkdir -p "/tmp/$RUN_ID"
cd "/tmp/$RUN_ID"