Skip to content

Commit 8e658cd

Browse files
authored
Update Github Badge for Workflow (#2020)
* add badge to build.yml * add rest badges * update badge in readme * fix lint * use html table * test font size * update table * fix lint * create badge in step * fix windows badge * check table * make badge and text in one line
1 parent 3b62b21 commit 8e658cd

File tree

5 files changed

+461
-25
lines changed

5 files changed

+461
-25
lines changed

.github/workflows/backend-ncnn.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
echo $(pwd)
5959
ln -s build/bin/mmdeploy_onnx2ncnn ./
6060
python .github/scripts/test_onnx2ncnn.py --run 1
61+
6162
build_ncnn:
6263
runs-on: ubuntu-20.04
6364
strategy:

.github/workflows/backend-pplnn.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,22 @@ jobs:
4242
-Dpplnn_DIR=${pplnn_DIR}
4343
ls build/lib
4444
- name: Install mmdeploy with pplnn
45+
id: badge_status
4546
run: |
4647
rm -rf .eggs && python3 -m pip install -e .
4748
export LD_LIBRARY_PATH="/root/workspace/mmdeploy/build/lib:${LD_LIBRARY_PATH}"
4849
python3 tools/check_env.py
4950
python3 -c 'import mmdeploy.apis.pplnn as pplnn_api; assert pplnn_api.is_available()'
51+
- name: create badge
52+
if: always()
53+
uses: RubbaBoy/[email protected]
54+
with:
55+
NAME: build_pplnn_cuda
56+
LABEL: 'build'
57+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
58+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
5061

5162
build_pplnn_cpu:
5263
runs-on: ubuntu-20.04
@@ -56,8 +67,18 @@ jobs:
5667
with:
5768
submodules: 'recursive'
5869
- name: Install mmdeploy with pplnn
70+
id: badge_status
5971
run: |
6072
python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu
6173
python -m pip install mmcv-lite protobuf==3.20.2
6274
python tools/scripts/build_ubuntu_x64_pplnn.py 8
6375
python -c 'import mmdeploy.apis.pplnn as pplnn_api; assert pplnn_api.is_available()'
76+
- name: create badge
77+
if: always()
78+
uses: RubbaBoy/[email protected]
79+
with:
80+
NAME: build_pplnn_cpu
81+
LABEL: 'build'
82+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
83+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'blue' || 'red' }}
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,20 @@ jobs:
6464
coverage xml
6565
coverage report -m
6666
- name: Run mmyolo deploy unittests
67+
id: badge_status
6768
run: |
6869
python -m pip install xdoctest
6970
cd /home/runner/work/mmyolo
7071
pytest tests/test_deploy
72+
- name: create badge
73+
if: always()
74+
uses: RubbaBoy/[email protected]
75+
with:
76+
NAME: build_cpu_model_convert
77+
LABEL: 'build'
78+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
79+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7181

7282
build_cpu_sdk:
7383
runs-on: ubuntu-20.04
@@ -85,6 +95,7 @@ jobs:
8595
sudo apt install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev libc++1-9 libc++abi1-9
8696
sudo apt install libopencv-dev lcov wget
8797
- name: Build and run SDK unit test without backend
98+
id: badge_status
8899
run: |
89100
mkdir -p build && pushd build
90101
cmake .. -DCMAKE_CXX_COMPILER=g++ -DMMDEPLOY_CODEBASES=all -DMMDEPLOY_BUILD_SDK=ON -DMMDEPLOY_BUILD_SDK_PYTHON_API=OFF -DMMDEPLOY_TARGET_DEVICES=cpu -DMMDEPLOY_COVERAGE=ON -DMMDEPLOY_BUILD_TEST=ON
@@ -95,6 +106,15 @@ jobs:
95106
lcov --capture --directory . --output-file coverage.info
96107
ls -lah coverage.info
97108
cp coverage.info ../
109+
- name: create badge
110+
if: always()
111+
uses: RubbaBoy/[email protected]
112+
with:
113+
NAME: build_cpu_sdk
114+
LABEL: 'build'
115+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
116+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98118

99119
cross_build_aarch64:
100120
runs-on: ubuntu-20.04
@@ -110,8 +130,18 @@ jobs:
110130
with:
111131
python-version: 3.8
112132
- name: gcc-multilib
133+
id: badge_status
113134
run: |
114135
sh -ex tools/scripts/ubuntu_cross_build_aarch64.sh
136+
- name: create badge
137+
if: always()
138+
uses: RubbaBoy/[email protected]
139+
with:
140+
NAME: cross_build_aarch64
141+
LABEL: 'build'
142+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
143+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
144+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115145

116146
build_cuda102:
117147
runs-on: ubuntu-20.04
@@ -155,10 +185,20 @@ jobs:
155185
rm -rf .eggs && python -m pip install -e .
156186
python tools/check_env.py
157187
- name: Run unittests and generate coverage report
188+
id: badge_status
158189
run: |
159190
coverage run --branch --source mmdeploy -m pytest -rsE tests
160191
coverage xml
161192
coverage report -m
193+
- name: create badge
194+
if: always()
195+
uses: RubbaBoy/[email protected]
196+
with:
197+
NAME: build_cuda102
198+
LABEL: 'build'
199+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
200+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
201+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162202

163203
build_cuda113:
164204
runs-on: ubuntu-20.04
@@ -205,13 +245,23 @@ jobs:
205245
coverage xml
206246
coverage report -m
207247
- name: Upload coverage to Codecov
248+
id: badge_status
208249
uses: codecov/codecov-action@v2
209250
with:
210251
file: ./coverage.xml,./coverage.info
211252
flags: unittests
212253
env_vars: OS,PYTHON,CPLUS
213254
name: codecov-umbrella
214255
fail_ci_if_error: false
256+
- name: create badge
257+
if: always()
258+
uses: RubbaBoy/[email protected]
259+
with:
260+
NAME: build_cuda113
261+
LABEL: 'build'
262+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
263+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
264+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
215265

216266
build_cuda113_linux:
217267
runs-on: [self-hosted, linux-3090]
@@ -251,10 +301,20 @@ jobs:
251301
export LD_LIBRARY_PATH="/root/workspace/mmdeploy/build/lib:${LD_LIBRARY_PATH}"
252302
python3 tools/check_env.py
253303
- name: Test TensorRT pipeline
304+
id: badge_status
254305
run: |
255306
export LD_LIBRARY_PATH="/root/workspace/mmdeploy/build/lib:${LD_LIBRARY_PATH}"
256307
export LD_LIBRARY_PATH="/root/workspace/mmdeploy/mmdeploy/lib:${LD_LIBRARY_PATH}"
257308
bash .github/scripts/linux/test_full_pipeline.sh trt cuda
309+
- name: create badge
310+
if: always()
311+
uses: RubbaBoy/[email protected]
312+
with:
313+
NAME: build_cuda113_linux
314+
LABEL: 'build'
315+
STATUS: ${{ steps.badge_status.conclusion == 'success' && 'passing' || 'failing' }}
316+
COLOR: ${{ steps.badge_status.conclusion == 'success' && 'green' || 'red' }}
317+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
258318

259319
build_cuda113_windows:
260320
runs-on: [self-hosted, win10-3080]
@@ -316,3 +376,17 @@ jobs:
316376
conda activate $pwd\tmp_env
317377
$env:path = "$pwd\build\bin\Release;" + $env:path
318378
.github\scripts\windows\test_full_pipeline.ps1 -Backend trt -Device cuda
379+
380+
badge_build_cuda113_windows:
381+
needs: build_cuda113_windows
382+
if: always()
383+
runs-on: ubuntu-20.04
384+
steps:
385+
- name: create badge
386+
uses: RubbaBoy/[email protected]
387+
with:
388+
NAME: build_cuda113_windows
389+
LABEL: 'build'
390+
STATUS: ${{ needs.build_cuda113_windows.result == 'success' && 'passing' || needs.build_cuda113_windows.result }}
391+
COLOR: ${{ needs.build_cuda113_windows.result == 'success' && 'green' || 'red' }}
392+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)