-
Notifications
You must be signed in to change notification settings - Fork 69
140 lines (128 loc) · 4.6 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: LazyLLM ci
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- "**.md"
- ".git*"
- "docs/assets/**"
env:
CI_PATH: '/home/mnt/platform_ci/GitHub/${{ github.repository }}/${GITHUB_RUN_NUMBER}'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Clone:
if: |
!contains(github.event.head_commit.message, '[skip ci]')
&& !contains(github.event.pull_request.title, '[skip ci]')
runs-on: tps_sco_nv
steps:
- name: Check for required label
if: github.event_name == 'pull_request'
run: |
echo " Wait for lint "
sleep 360
echo ${{ github.event.number }}
PR_LABELS=$(curl -s "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels" | \
jq -r '.[].name')
if ! echo "$PR_LABELS" | grep -q 'lint_pass'; then
echo "The 'lint_pass' label is missing. Skipping CI process."
exit 1
fi
- name: Checkout code
uses: actions/checkout@v4
- name: Build doc
run: |
set -e
pip install -r requirements.txt
pip install -r docs/requirements.txt
python docs/add_docstrings.py
- name: Create custom directory
run: |
set -ex
echo ${{ env.CI_PATH }}
mkdir -p ${{ env.CI_PATH }}
- name: Clean custom directory
run: |
set -ex
if [ -d "${{ env.CI_PATH }}" ]; then
rm -rf ${{ env.CI_PATH }}/*
fi
- name: Move code to custom directory
run: |
set -ex
mv $GITHUB_WORKSPACE/* ${{ env.CI_PATH }}/
BasicTests:
runs-on: tps_sco_nv
needs: [Clone]
steps:
- name: RunTests
run: |
set -ex
cd ${{ env.CI_PATH }}
pip install -r tests/requirements.txt
realpath .
env | grep '^SCC'
export LAZYLLM_SCO_ENV_NAME=lazyllm
export LAZYLLM_DEFAULT_LAUNCHER=sco
export PYTHONPATH=$PWD:$PYTHONPATH
export LAZYLLM_DATA_PATH=/mnt/lustre/share_data/lazyllm/data/
export LAZYLLM_MODEL_PATH=/mnt/lustre/share_data/lazyllm/models
export LAZYLLM_HOME="${{ env.CI_PATH }}/${{ github.run_id }}-${{ github.job }}"
mkdir -p $LAZYLLM_HOME
python -m pytest --lf --last-failed-no-failures=all --durations=0 --reruns=2 -v tests/basic_tests/
AdvancedStandardTests:
runs-on: tps_sco_nv
needs: [Clone]
steps:
- name: RunTests
run: |
cd ${{ env.CI_PATH }}
pip install -r tests/requirements.txt
env | grep '^SCC'
export LAZYLLM_SCO_ENV_NAME=lazyllm
export LAZYLLM_DEFAULT_LAUNCHER=sco
export PYTHONPATH=$PWD:$PYTHONPATH
export LAZYLLM_DATA_PATH=/mnt/lustre/share_data/lazyllm/data/
export LAZYLLM_MODEL_PATH=/mnt/lustre/share_data/lazyllm/models
export LAZYLLM_HOME="${{ env.CI_PATH }}/${{ github.run_id }}-${{ github.job }}"
mkdir -p $LAZYLLM_HOME
source ~/ENV/env.sh
python -m pytest --lf --last-failed-no-failures=all --durations=0 --reruns=2 -v tests/advanced_tests/standard_test/
AdvancedFullTests:
runs-on: tps_sco_nv
needs: [Clone]
steps:
- name: RunTests
run: |
cd ${{ env.CI_PATH }}
env | grep '^SCC'
export LAZYLLM_SCO_ENV_NAME=lazyllm
export LAZYLLM_DEFAULT_LAUNCHER=sco
export PYTHONPATH=$PWD:$PYTHONPATH
export LAZYLLM_DATA_PATH=/mnt/lustre/share_data/lazyllm/data/
export LAZYLLM_MODEL_PATH=/mnt/lustre/share_data/lazyllm/models
export LAZYLLM_HOME="${{ env.CI_PATH }}/${{ github.run_id }}-${{ github.job }}"
mkdir -p $LAZYLLM_HOME
python -m pytest --lf --last-failed-no-failures=all --durations=0 --reruns=2 -v tests/advanced_tests/full_test/
ChargeTests:
runs-on: tps_sco_nv
needs: [ Clone ]
steps:
- name: RunTests
run: |
cd ${{ env.CI_PATH }}
pip install -r tests/requirements.txt
export PYTHONPATH=$PWD:$PYTHONPATH
export LAZYLLM_DATA_PATH=/mnt/lustre/share_data/lazyllm/data/
export LAZYLLM_MODEL_PATH=/mnt/lustre/share_data/lazyllm/models
export LAZYLLM_HOME="${{ env.CI_PATH }}/${{ github.run_id }}-${{ github.job }}"
mkdir -p $LAZYLLM_HOME
source ~/ENV/env.sh
python -m pytest --lf --last-failed-no-failures=all --durations=0 --reruns=2 -v tests/charge_tests