Skip to content

Commit 45a6ac0

Browse files
zxk114pymumu
authored andcommitted
action: unittest add armd & fix armd image issue
1 parent 5bd487d commit 45a6ac0

9 files changed

+64
-32
lines changed

.github/workflows/manual-build-with-image.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,37 @@ jobs:
2626
runs-on: ubuntu-latest
2727
container:
2828
image: ${{ github.event.inputs.images_name }}
29-
3029
steps:
31-
- uses: actions/checkout@v3
30+
- name: Checkout
31+
uses: actions/checkout@v3
3232
- name: Configure CMake
3333
run: |
3434
mkdir build
3535
cd build
36-
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on
37-
36+
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
3837
- name: Build
3938
working-directory: build
40-
run: |
41-
make package -j8
42-
39+
run: make package -j8
4340
- name: Release check
4441
run: ./docker/artifact_check.sh
4542
shell: bash
46-
4743
- name: Test
4844
working-directory: build
49-
run: |
45+
run: |
46+
osName=$(cat /etc/os-release|sed -n "/^NAME/p"|awk -F'"' '{print $2}')
47+
if [ "${osName,,}" == "ubuntu" ];then
48+
if [ $(dpkg -l|grep modelbox|awk '{print $2}'|wc -l) -ne 0 ];then
49+
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
50+
fi
51+
dpkg -i release/*.deb
52+
elif [ "${osName,,}" == "openeuler" ];then
53+
if [ $(rpm -qa|grep modelbox|wc -l) -ne 0 ];then
54+
rpm -e $(rpm -qa|grep modelbox)
55+
fi
56+
rpm -ivh release/*.rpm --force --nodeps
57+
fi
58+
python3 -m pip install --no-cache-dir release/python/modelbox-*.whl --force-reinstall
5059
make build-test -j8
5160
unset LD_LIBRARY_PATH
5261
make unittest
62+
shell: bash

.github/workflows/merge-request-ascend.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ jobs:
5555
5656
- name: Test
5757
working-directory: build
58-
run: |
58+
run: |
59+
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
60+
dpkg -i release/*.deb
61+
python3 -m pip install --no-cache-dir release/python/modelbox-*.whl --force-reinstall
5962
make build-test -j8
6063
unset LD_LIBRARY_PATH
6164
make unittest

.github/workflows/merge-request-cuda.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ jobs:
5555
5656
- name: Test
5757
working-directory: build
58-
run: |
58+
run: |
59+
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
60+
dpkg -i release/*.deb
61+
python3 -m pip install --no-cache-dir release/python/modelbox-*.whl --force-reinstall
5962
make build-test -j8
6063
unset LD_LIBRARY_PATH
6164
make unittest

.github/workflows/publish-modelbox-images.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
153153
- name: Test
154154
working-directory: build
155-
run: |
155+
run: |
156156
make build-test -j8
157157
make unittest
158158
@@ -296,7 +296,7 @@ jobs:
296296
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
297297
- name: Test
298298
working-directory: build
299-
run: |
299+
run: |
300300
make build-test -j8
301301
make unittest
302302
@@ -440,7 +440,7 @@ jobs:
440440
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
441441
- name: Test
442442
working-directory: build
443-
run: |
443+
run: |
444444
make build-test -j8
445445
make unittest
446446
@@ -584,7 +584,7 @@ jobs:
584584
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
585585
- name: Test
586586
working-directory: build
587-
run: |
587+
run: |
588588
make build-test -j8
589589
make unittest
590590
@@ -702,7 +702,7 @@ jobs:
702702
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
703703
- name: Test
704704
working-directory: build
705-
run: |
705+
run: |
706706
make build-test -j8
707707
make unittest
708708
@@ -807,7 +807,10 @@ jobs:
807807
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on -DUSE_CN_MIRROR=yes
808808
- name: Test
809809
working-directory: build
810-
run: |
810+
run: |
811+
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
812+
dpkg -i /mnt/release/*.deb
813+
python3 -m pip install --no-cache-dir /mnt/release/python/modelbox-*.whl --force-reinstall
811814
make build-test -j8
812815
make unittest
813816
@@ -951,7 +954,7 @@ jobs:
951954
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
952955
- name: Test
953956
working-directory: build
954-
run: |
957+
run: |
955958
make build-test -j8
956959
make unittest
957960
@@ -1095,7 +1098,7 @@ jobs:
10951098
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
10961099
- name: Test
10971100
working-directory: build
1098-
run: |
1101+
run: |
10991102
make build-test -j8
11001103
make unittest
11011104
@@ -1239,7 +1242,7 @@ jobs:
12391242
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
12401243
- name: Test
12411244
working-directory: build
1242-
run: |
1245+
run: |
12431246
make build-test -j8
12441247
make unittest
12451248
@@ -1383,7 +1386,7 @@ jobs:
13831386
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
13841387
- name: Test
13851388
working-directory: build
1386-
run: |
1389+
run: |
13871390
make build-test -j8
13881391
make unittest
13891392
@@ -1501,7 +1504,7 @@ jobs:
15011504
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on
15021505
- name: Test
15031506
working-directory: build
1504-
run: |
1507+
run: |
15051508
make build-test -j8
15061509
make unittest
15071510
@@ -1607,6 +1610,9 @@ jobs:
16071610
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_ALL_DEMO=on -DWITH_WEBUI=on -DUSE_CN_MIRROR=yes
16081611
- name: Test
16091612
working-directory: build
1610-
run: |
1613+
run: |
1614+
rpm -e $(rpm -qa|grep modelbox)
1615+
rpm -ivh /mnt/release/*.rpm --force --nodeps
1616+
python3 -m pip install --no-cache-dir /mnt/release/python/modelbox-*.whl --force-reinstall
16111617
make build-test -j8
16121618
make unittest

.github/workflows/unit-test-daily-on-device.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ jobs:
1919
- tensorrt
2020
- pytorch
2121
- tensorflow
22+
- ubuntu
2223

2324
steps:
24-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2526
- name: Configure CMake
2627
run: |
2728
mkdir build
@@ -35,7 +36,10 @@ jobs:
3536
3637
- name: Test
3738
working-directory: build
38-
run: |
39+
run: |
40+
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
41+
dpkg -i release/*.deb
42+
python3 -m pip install --no-cache-dir release/python/modelbox-*.whl --force-reinstall
3943
make build-test -j4
4044
unset LD_LIBRARY_PATH
4145
make unittest

.github/workflows/unit-test-pull-requests-on-device.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ jobs:
4343
- tensorrt
4444
- pytorch
4545
- tensorflow
46+
- ubuntu
4647

4748
steps:
48-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v3
4950
with:
5051
ref: pull/${{github.event.inputs.PullRequestId}}/head
5152
- name: Configure CMake
@@ -61,7 +62,10 @@ jobs:
6162
6263
- name: Test
6364
working-directory: build
64-
run: |
65+
run: |
66+
dpkg -r $(dpkg -l|grep modelbox|awk '{print $2}')
67+
dpkg -i release/*.deb
68+
python3 -m pip install --no-cache-dir release/python/modelbox-*.whl --force-reinstall
6569
make build-test -j${{github.event.inputs.maxParallel}}
6670
unset LD_LIBRARY_PATH
6771
make unittest

docker/Dockerfile.ascend.develop.ubuntu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ WORKDIR /root
3636

3737
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
3838
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
39-
if [ "$(arch)" = "aarch64" ];then sed -i 's@ports.ubuntu.com@mirrors.ustc.edu.cn@g' /etc/apt/sources.list;fi && \
39+
if [ "$(arch)" = "aarch64" ];then sed -i '/proposed/d' /etc/apt/sources.list && \
40+
sed -i 's@ports.ubuntu.com@mirrors.ustc.edu.cn@g' /etc/apt/sources.list;fi && \
4041
apt update && apt upgrade -y && \
4142
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools apt-utils && \
4243
apt install -y dbus systemd systemd-cron iproute2 gnupg2 curl libcurl4-openssl-dev ca-certificates \

docker/Dockerfile.ascend.runtime.ubuntu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ WORKDIR /root
2121

2222
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
2323
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
24-
if [ "$(arch)" = "aarch64" ];then sed -i 's@ports.ubuntu.com@mirrors.ustc.edu.cn@g' /etc/apt/sources.list;fi && \
24+
if [ "$(arch)" = "aarch64" ];then sed -i '/proposed/d' /etc/apt/sources.list && \
25+
sed -i 's@ports.ubuntu.com@mirrors.ustc.edu.cn@g' /etc/apt/sources.list;fi && \
2526
apt update && apt upgrade -y && \
2627
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools && \
2728
apt install -y dbus systemd systemd-cron iproute2 gnupg2 libfuse2 libgtk-3-0 apt-utils \

docker/artifact_check.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
CODE_DIR=$(cd $(dirname $0)/..;pwd)
33
release_dir=${CODE_DIR}/build/release
44
ls -lh ${release_dir}
5-
os_name=$(sed -nr '1s/^NAME="(.*)"$/\1/gp' /etc/os-release)
6-
if [ "$os_name" == "Ubuntu" ];then
5+
osName=$(sed -nr '1s/^NAME="(.*)"$/\1/gp' /etc/os-release)
6+
if [ "${osName,,}" == "ubuntu" ];then
77
rm -f ${release_dir}/*.rpm
88
postfix="*.deb"
9-
elif [ "$os_name" == "openEuler" ];then
9+
elif [ "${osName,,}" == "openeuler" ];then
1010
postfix="*.rpm"
1111
fi
1212

0 commit comments

Comments
 (0)