rm other workflow for test
parent
6c1f4c0119
commit
0a03872750
|
@ -1,54 +0,0 @@
|
|||
name: backend-ascend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_sdk_demo:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev libc++1-9 libc++abi1-9
|
||||
sudo add-apt-repository ppa:ignaciovizzo/opencv3-nonfree
|
||||
sudo apt install libopencv-dev
|
||||
pkg-config --libs opencv
|
||||
- name: Install Ascend Toolkit
|
||||
run: |
|
||||
mkdir -p $GITHUB_WORKSPACE/Ascend
|
||||
wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%205.1.RC2/Ascend-cann-toolkit_5.1.RC2_linux-x86_64.run
|
||||
sh Ascend-cann-toolkit_5.1.RC2_linux-x86_64.run --install --install-path=$GITHUB_WORKSPACE/Ascend --quiet --chip=Ascend310 --blacklist=devtools
|
||||
- name: Build SDK Demo with Ascend backend
|
||||
run: |
|
||||
mkdir -p build && pushd build
|
||||
source $GITHUB_WORKSPACE/Ascend/ascend-toolkit/set_env.sh
|
||||
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/Ascend/ascend-toolkit/latest/runtime/lib64/stub:$LD_LIBRARY_PATH
|
||||
cmake .. -DMMDEPLOY_BUILD_SDK=ON -DMMDEPLOY_BUILD_EXAMPLES=ON -DMMDEPLOY_TARGET_BACKENDS=acl
|
||||
make install -j4
|
|
@ -1,71 +0,0 @@
|
|||
name: backend-coreml
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "csrc/**"
|
||||
- "demo/csrc/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- "csrc/**"
|
||||
- "demo/csrc/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build_macos_arm64:
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: install opencv
|
||||
run: |
|
||||
wget https://github.com/irexyc/mmdeploy-ci-resource/releases/download/opencv/opencv-osx-arm64-4.6.0.tar.gz
|
||||
mkdir $GITHUB_WORKSPACE/opencv-install
|
||||
tar xf opencv-osx-arm64-4.6.0.tar.gz -C $GITHUB_WORKSPACE/opencv-install
|
||||
- name: install libtorch
|
||||
run: |
|
||||
wget https://github.com/irexyc/mmdeploy-ci-resource/releases/download/libtorch/libtorch-osx-arm64-1.8.0.tar.gz
|
||||
mkdir $GITHUB_WORKSPACE/libtorch-install
|
||||
tar xf libtorch-osx-arm64-1.8.0.tar.gz -C $GITHUB_WORKSPACE/libtorch-install
|
||||
- name: build-static-lib
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_OSX_ARCHITECTURES="arm64" \
|
||||
-DCMAKE_SYSTEM_PROCESSOR="arm64" \
|
||||
-DMMDEPLOY_BUILD_SDK=ON \
|
||||
-DOpenCV_DIR=$GITHUB_WORKSPACE/opencv-install/lib/cmake/opencv4 \
|
||||
-DTorch_DIR=$GITHUB_WORKSPACE/libtorch-install/share/cmake/Torch \
|
||||
-DMMDEPLOY_TARGET_BACKENDS="coreml" \
|
||||
-DMMDEPLOY_BUILD_EXAMPLES=ON \
|
||||
-DMMDEPLOY_BUILD_SDK_MONOLITHIC=OFF \
|
||||
-DMMDEPLOY_SHARED_LIBS=OFF
|
||||
cmake --build . -j 3
|
||||
cmake --build . --target install
|
||||
- name: build-monolithic-lib
|
||||
run: |
|
||||
mkdir build-shared && cd build-shared
|
||||
cmake .. -DCMAKE_OSX_ARCHITECTURES="arm64" \
|
||||
-DCMAKE_SYSTEM_PROCESSOR="arm64" \
|
||||
-DMMDEPLOY_BUILD_SDK=ON \
|
||||
-DMMDEPLOY_TARGET_DEVICES="cpu" \
|
||||
-DMMDEPLOY_CODEBASES=all \
|
||||
-DOpenCV_DIR=$GITHUB_WORKSPACE/opencv-install/lib/cmake/opencv4 \
|
||||
-DTorch_DIR=$GITHUB_WORKSPACE/libtorch-install/share/cmake/Torch \
|
||||
-DMMDEPLOY_TARGET_BACKENDS="coreml" \
|
||||
-DMMDEPLOY_BUILD_SDK_MONOLITHIC=ON \
|
||||
-DMMDEPLOY_SHARED_LIBS=OFF \
|
||||
-DMMDEPLOY_BUILD_EXAMPLES=ON
|
||||
cmake --build . -j 3
|
||||
cmake --build . --target install
|
|
@ -1,82 +0,0 @@
|
|||
name: backend-ncnn
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test_onnx2ncnn:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install unittest dependencies
|
||||
run: |
|
||||
python -m pip install cmake onnx
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: gcc-multilib
|
||||
run: sudo apt install gcc-multilib g++-multilib wget libprotobuf-dev protobuf-compiler
|
||||
- name: Install ncnn
|
||||
run: |
|
||||
wget https://github.com/Tencent/ncnn/archive/refs/tags/20220420.tar.gz
|
||||
tar xf 20220420.tar.gz
|
||||
pushd ncnn-20220420
|
||||
mkdir build && pushd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/../install -DNCNN_BUILD_TESTS=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
|
||||
cmake --build . -j2
|
||||
make install
|
||||
popd && popd
|
||||
- name: Install mmdeploy with ncnn backend
|
||||
run: |
|
||||
mkdir -p build && pushd build
|
||||
export LD_LIBRARY_PATH=/home/runner/work/mmdeploy/mmdeploy/ncnn-20220420/install/lib/:$LD_LIBRARY_PATH
|
||||
cmake -DMMDEPLOY_TARGET_BACKENDS=ncnn -Dncnn_DIR=/home/runner/work/mmdeploy/mmdeploy/ncnn-20220420/install/lib/cmake/ncnn/ ..
|
||||
make mmdeploy_onnx2ncnn -j2
|
||||
popd
|
||||
- name: Test onnx2ncnn
|
||||
run: |
|
||||
echo $(pwd)
|
||||
ln -s build/bin/mmdeploy_onnx2ncnn ./
|
||||
python .github/scripts/test_onnx2ncnn.py --run 1
|
||||
script_install:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install mmdeploy
|
||||
run: |
|
||||
python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu
|
||||
python -m pip install mmcv-lite
|
||||
python tools/scripts/build_ubuntu_x64_ncnn.py
|
||||
python -c 'import mmdeploy.apis.ncnn as ncnn_api; assert ncnn_api.is_available(with_custom_ops=True)'
|
|
@ -1,46 +0,0 @@
|
|||
name: backend-ort
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
script_install:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install mmdeploy
|
||||
run: |
|
||||
python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu
|
||||
python -m pip install mmcv-lite openmim
|
||||
python tools/scripts/build_ubuntu_x64_ort.py
|
||||
python -c 'import mmdeploy.apis.onnxruntime as ort_api; assert ort_api.is_available(with_custom_ops=True)'
|
||||
- name: test mmcls full pipeline
|
||||
run: |
|
||||
python -m mim install $(cat requirements/codebases.txt | grep mmcls)
|
||||
export MMDEPLOY_DIR=$(pwd)
|
||||
export ONNXRUNTIME_DIR=$MMDEPLOY_DIR/../mmdeploy-dep/onnxruntime-linux-x64-1.8.1
|
||||
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$MMDEPLOY_DIR/build/install/lib:$LD_LIBRARY_PATH
|
||||
bash .github/scripts/test_mmcls_full_pipeline.sh
|
|
@ -1,39 +0,0 @@
|
|||
name: backend-pplnn
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
script_install:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install mmdeploy
|
||||
run: |
|
||||
python -m pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cpu
|
||||
python -m pip install mmcv-lite
|
||||
python tools/scripts/build_ubuntu_x64_pplnn.py
|
||||
python -c 'import mmdeploy.apis.pplnn as pplnn_api; assert pplnn_api.is_available()'
|
|
@ -1,44 +0,0 @@
|
|||
name: backend-rknn
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "csrc/**"
|
||||
- "demo/csrc/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "csrc/**"
|
||||
- "demo/csrc/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_rknpu2:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: cross compile
|
||||
run: |
|
||||
sh -x tools/scripts/ubuntu_cross_build_rknn.sh rk3588
|
||||
build_rknpu:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: cross compile
|
||||
run: |
|
||||
sh -x tools/scripts/ubuntu_cross_build_rknn.sh rv1126
|
|
@ -1,60 +0,0 @@
|
|||
name: backend-snpe
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_sdk_demo:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt install wget libprotobuf-dev protobuf-compiler
|
||||
sudo apt update
|
||||
sudo apt install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev libc++1-9 libc++abi1-9
|
||||
sudo add-apt-repository ppa:ignaciovizzo/opencv3-nonfree
|
||||
sudo apt install libopencv-dev
|
||||
pkg-config --libs opencv
|
||||
- name: Install snpe
|
||||
run: |
|
||||
wget https://media.githubusercontent.com/media/tpoisonooo/mmdeploy_snpe_testdata/main/snpe-1.59.tar.gz
|
||||
tar xf snpe-1.59.tar.gz
|
||||
pushd snpe-1.59.0.3230
|
||||
pwd
|
||||
popd
|
||||
- name: Build SDK Demo with SNPE backend
|
||||
run: |
|
||||
mkdir -p build && pushd build
|
||||
export SNPE_ROOT=/home/runner/work/mmdeploy/mmdeploy/snpe-1.59.0.3230
|
||||
export LD_LIBRARY_PATH=${SNPE_ROOT}/lib/x86_64-linux-clang:${LD_LIBRARY_PATH}
|
||||
export MMDEPLOY_SNPE_X86_CI=1
|
||||
cmake .. -DMMDEPLOY_BUILD_SDK=ON -DMMDEPLOY_TARGET_BACKENDS=snpe
|
||||
make -j2
|
||||
make install
|
||||
pushd install/example
|
||||
mkdir build && pushd build
|
||||
cmake ../cpp -DMMDeploy_DIR=${PWD}/../../lib/cmake/MMDeploy
|
||||
make -j2
|
||||
ls ./*
|
||||
popd
|
||||
popd
|
||||
popd
|
|
@ -1,37 +0,0 @@
|
|||
name: backend-ort
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
script_install:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install mmdeploy
|
||||
run: |
|
||||
python -m pip install mmcv-lite
|
||||
python tools/scripts/build_ubuntu_x64_torchscript.py
|
|
@ -1,220 +0,0 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- ".github/scripts/**"
|
||||
- "demo/**"
|
||||
- "docker/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- ".github/scripts/**"
|
||||
- "demo/**"
|
||||
- "docker/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_cpu_model_convert:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
torch: [1.8.0, 1.9.0]
|
||||
include:
|
||||
- torch: 1.8.0
|
||||
torch_version: torch1.8
|
||||
torchvision: 0.9.0
|
||||
- torch: 1.9.0
|
||||
torch_version: torch1.9
|
||||
torchvision: 0.10.0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install PyTorch
|
||||
run: python -m pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
||||
- name: Install unittest dependencies
|
||||
run: |
|
||||
python -m pip install openmim
|
||||
python -m pip install -r requirements.txt -r requirements/backends.txt
|
||||
python -m mim install "mmcv>=2.0.0rc1"
|
||||
python -m mim install -r requirements/codebases.txt
|
||||
python -m pip install -U numpy clip
|
||||
python -m pip list
|
||||
- name: Install mmyolo
|
||||
run: |
|
||||
git clone -b dev --depth 1 https://github.com/open-mmlab/mmyolo.git /home/runner/work/mmyolo
|
||||
python -m pip install -v -e /home/runner/work/mmyolo
|
||||
- name: Build and install
|
||||
run: |
|
||||
rm -rf .eggs && python -m pip install -e .
|
||||
python tools/check_env.py
|
||||
- name: Run python unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmdeploy -m pytest -rsE tests
|
||||
coverage xml
|
||||
coverage report -m
|
||||
- name: Run mmyolo deploy unittests
|
||||
run: |
|
||||
python -m pip install xdoctest
|
||||
cd /home/runner/work/mmyolo
|
||||
pytest tests/test_deploy
|
||||
|
||||
build_cpu_sdk:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: gcc-multilib
|
||||
run: |
|
||||
sudo apt install gcc-multilib g++-multilib wget libprotobuf-dev protobuf-compiler
|
||||
sudo apt update
|
||||
sudo apt install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev libc++1-9 libc++abi1-9
|
||||
sudo add-apt-repository ppa:ignaciovizzo/opencv3-nonfree
|
||||
sudo apt install libopencv-dev lcov wget
|
||||
pkg-config --libs opencv
|
||||
- name: Build and run SDK unit test without backend
|
||||
run: |
|
||||
mkdir -p build && pushd build
|
||||
cmake .. -DCMAKE_CXX_COMPILER=g++-7 -DMMDEPLOY_CODEBASES=all -DMMDEPLOY_BUILD_SDK=ON -DMMDEPLOY_BUILD_SDK_PYTHON_API=OFF -DMMDEPLOY_TARGET_DEVICES=cpu -DMMDEPLOY_COVERAGE=ON -DMMDEPLOY_BUILD_TEST=ON
|
||||
make -j2
|
||||
mkdir -p mmdeploy_test_resources/transform
|
||||
cp ../tests/data/tiger.jpeg mmdeploy_test_resources/transform/
|
||||
./bin/mmdeploy_tests
|
||||
lcov --capture --directory . --output-file coverage.info
|
||||
ls -lah coverage.info
|
||||
cp coverage.info ../
|
||||
|
||||
cross_build_aarch64:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: gcc-multilib
|
||||
run: |
|
||||
sh -x tools/scripts/ubuntu_cross_build_aarch64.sh
|
||||
|
||||
build_cuda102:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel
|
||||
env:
|
||||
FORCE_CUDA: 1
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
torch: [1.9.0+cu102]
|
||||
include:
|
||||
- torch: 1.9.0+cu102
|
||||
torch_version: torch1.9
|
||||
torchvision: 0.10.0+cu102
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
|
||||
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev python${{matrix.python-version}}-dev
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
- name: Install PyTorch
|
||||
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -V
|
||||
export CFLAGS=`python -c 'import sysconfig;print("-I"+sysconfig.get_paths()["include"])'`
|
||||
python -m pip install openmim
|
||||
python -m pip install -r requirements.txt -r requirements/backends.txt
|
||||
python -m mim install "mmcv>=2.0.0rc1"
|
||||
CFLAGS=$CFLAGS python -m mim install -r requirements/codebases.txt
|
||||
python -m pip install -U pycuda numpy clip
|
||||
python -m pip list
|
||||
- name: Build and install
|
||||
run: |
|
||||
rm -rf .eggs && python -m pip install -e .
|
||||
python tools/check_env.py
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmdeploy -m pytest -rsE tests
|
||||
coverage xml
|
||||
coverage report -m
|
||||
|
||||
build_cuda111:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
torch: [1.8.0+cu111]
|
||||
include:
|
||||
- torch: 1.8.0+cu111
|
||||
torch_version: torch1.8
|
||||
torchvision: 0.9.0+cu111
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
|
||||
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev python${{matrix.python-version}}-dev
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
- name: Install PyTorch
|
||||
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -V
|
||||
export CFLAGS=`python -c 'import sysconfig;print("-I"+sysconfig.get_paths()["include"])'`
|
||||
python -m pip install openmim
|
||||
python -m pip install -r requirements.txt -r requirements/backends.txt
|
||||
python -m mim install "mmcv>=2.0.0rc1"
|
||||
python -m mim install -r requirements/codebases.txt
|
||||
python -m pip install -U pycuda numpy clip
|
||||
python -m pip list
|
||||
- name: Build and install
|
||||
run: |
|
||||
rm -rf .eggs && python -m pip install -e .
|
||||
python tools/check_env.py
|
||||
- name: Run unittests and generate coverage report
|
||||
run: |
|
||||
coverage run --branch --source mmdeploy -m pytest -rsE tests
|
||||
coverage xml
|
||||
coverage report -m
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
file: ./coverage.xml,./coverage.info
|
||||
flags: unittests
|
||||
env_vars: OS,PYTHON,CPLUS
|
||||
name: codecov-umbrella
|
||||
fail_ci_if_error: false
|
|
@ -1,72 +0,0 @@
|
|||
name: java_api
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test_java_api:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install unittest dependencies
|
||||
run: |
|
||||
python -m pip install cmake onnx
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: Install OpenJDK
|
||||
run: |
|
||||
wget https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz
|
||||
tar xvf openjdk-18_linux-x64_bin.tar.gz
|
||||
- name: gcc-multilib
|
||||
run: sudo apt install gcc-multilib g++-multilib wget libprotobuf-dev protobuf-compiler
|
||||
- name: Install onnxruntime
|
||||
run: |
|
||||
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
|
||||
tar -zxvf onnxruntime-linux-x64-1.8.1.tgz
|
||||
pushd onnxruntime-linux-x64-1.8.1
|
||||
export ONNXRUNTIME_DIR=${PWD}
|
||||
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
||||
popd
|
||||
- name: Install opencv
|
||||
run: |
|
||||
sudo apt-get install libopencv-dev
|
||||
- name: Build java class
|
||||
run: |
|
||||
pushd csrc/mmdeploy/apis/java
|
||||
javac mmdeploy/*.java
|
||||
popd
|
||||
pushd demo/java
|
||||
javac -classpath ../../csrc/mmdeploy/apis/java/ Utils.java
|
||||
popd
|
||||
- name: Install mmdeploy with onnxruntime backend and java api
|
||||
run: |
|
||||
mkdir -p build && pushd build
|
||||
export LD_LIBRARY_PATH=/home/runner/work/mmdeploy/mmdeploy/ncnn/install/lib/:$LD_LIBRARY_PATH
|
||||
cmake -DMMDEPLOY_BUILD_SDK=ON -DMMDEPLOY_BUILD_SDK_JAVA_API=ON -DMMDEPLOY_TARGET_BACKENDS=ort -DMMDEPLOY_CODEBASES=all -DONNXRUNTIME_DIR=~/work/mmdeploy/mmdeploy/onnxruntime-linux-x64-1.8.1 ..
|
||||
make install
|
||||
popd
|
||||
- name: Test javademo
|
||||
run: |
|
||||
export JAVA_HOME=${PWD}/jdk-18
|
||||
export PATH=${JAVA_HOME}/bin:${PATH}
|
||||
export LD_LIBRARY_PATH=/build/lib:${LD_LIBRARY_PATH}
|
||||
java --version
|
||||
python .github/scripts/test_java_demo.py
|
|
@ -1,52 +0,0 @@
|
|||
name: lint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install pre-commit hook
|
||||
run: |
|
||||
python -m pip install pre-commit
|
||||
pre-commit install
|
||||
- name: Linting
|
||||
run: pre-commit run --all-files
|
||||
- name: Format c/cuda codes with clang-format
|
||||
uses: DoozyX/clang-format-lint-action@v0.11
|
||||
with:
|
||||
source: csrc
|
||||
extensions: h,c,cpp,hpp,cu,cuh
|
||||
style: file
|
||||
- name: Check index.rst
|
||||
run: |
|
||||
python .github/scripts/check_index_rst.py docs/en/index.rst
|
||||
python .github/scripts/check_index_rst.py docs/zh_cn/index.rst
|
||||
- name: Check markdown link
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
use-quiet-mode: 'yes'
|
||||
use-verbose-mode: 'yes'
|
||||
# check-modified-files-only: 'yes'
|
||||
config-file: '.github/md-link-config.json'
|
||||
folder-path: 'docs/en, docs/zh_cn'
|
||||
file-path: './README.md, ./LICENSE, ./README_zh-CN.md'
|
||||
- name: Check doc link
|
||||
run: |
|
||||
python .github/scripts/doc_link_checker.py --target docs/zh_cn
|
||||
python .github/scripts/doc_link_checker.py --target README_zh-CN.md
|
||||
python .github/scripts/doc_link_checker.py --target docs/en
|
||||
python .github/scripts/doc_link_checker.py --target README.md
|
||||
- name: Check docstring coverage
|
||||
run: |
|
||||
python -m pip install interrogate
|
||||
interrogate -v --ignore-init-method --ignore-module --ignore-private --ignore-nested-functions --ignore-nested-classes --fail-under 80 mmdeploy
|
||||
- name: Check pylint score
|
||||
run: |
|
||||
python -m pip install pylint
|
||||
pylint mmdeploy
|
|
@ -1,53 +0,0 @@
|
|||
name: build_riscv64_gcc
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "csrc/**"
|
||||
- "demo/csrc/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "csrc/**"
|
||||
- "demo/csrc/**"
|
||||
- "CMakeLists.txt"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_riscv64_gcc:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: riscv64-gnu-toolchain
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install g++-riscv64-linux-gnu
|
||||
- name: install opencv
|
||||
run: |
|
||||
mkdir $GITHUB_WORKSPACE/opencv-install
|
||||
wget https://github.com/irexyc/mmdeploy-ci-resource/raw/opencv/opencv_4.6.0_linux_riscv64.tar.gz
|
||||
tar xf opencv_4.6.0_linux_riscv64.tar.gz -C $GITHUB_WORKSPACE/opencv-install
|
||||
- name: install ncnn
|
||||
run: |
|
||||
mkdir $GITHUB_WORKSPACE/ncnn-install
|
||||
wget https://github.com/irexyc/mmdeploy-ci-resource/raw/ncnn/ncnn_20220729_linux_riscv64.tar.gz
|
||||
tar xf ncnn_20220729_linux_riscv64.tar.gz -C $GITHUB_WORKSPACE/ncnn-install
|
||||
- name: build
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/riscv64-linux-gnu.cmake \
|
||||
-DMMDEPLOY_BUILD_SDK=ON \
|
||||
-DMMDEPLOY_BUILD_EXAMPLES=ON \
|
||||
-DMMDEPLOY_TARGET_BACKENDS="ncnn" \
|
||||
-Dncnn_DIR=$GITHUB_WORKSPACE/ncnn-install/lib/cmake/ncnn/ \
|
||||
-DOpenCV_DIR=$GITHUB_WORKSPACE/opencv-install/lib/cmake/opencv4
|
||||
make -j$(nproc)
|
||||
make install
|
|
@ -1,72 +0,0 @@
|
|||
name: quantize
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "demo/**"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test_ncnn_PTQ:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
torch: [1.8.0+cu111]
|
||||
include:
|
||||
- torch: 1.8.0+cu111
|
||||
torch_version: torch1.8
|
||||
torchvision: 0.9.0+cu111
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
|
||||
apt-get update && apt-get install -y wget ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev python${{matrix.python-version}}-dev
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
- name: Install PyTorch
|
||||
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -V
|
||||
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install -U numpy
|
||||
|
||||
- name: Install mmcls
|
||||
run: |
|
||||
python -m pip install openmim
|
||||
python -m mim install $(cat requirements/codebases.txt | grep mmcls)
|
||||
git clone --depth 1 --branch 1.x https://github.com/open-mmlab/mmclassification.git ~/mmclassification
|
||||
cd ~/mmclassification && python -m pip install . && cd -
|
||||
- name: Install ppq
|
||||
run: |
|
||||
python -m pip install protobuf==3.20.0
|
||||
git clone https://github.com/openppl-public/ppq ~/ppq
|
||||
cd ~/ppq && git checkout edbecf44c7b203515640e4f4119c000a1b66b33a
|
||||
python -m pip install -r requirements.txt
|
||||
python setup.py install
|
||||
cd -
|
||||
- name: Run tests
|
||||
run: |
|
||||
echo $(pwd)
|
||||
python .github/scripts/quantize_to_ncnn.py
|
|
@ -1,64 +0,0 @@
|
|||
name: rust_api
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "tools/**"
|
||||
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test_rust_api:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install latest nightly Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
- name: update
|
||||
run: sudo apt update
|
||||
- name: Install dependencies
|
||||
run: sudo apt install llvm-dev libclang-dev clang git-lfs
|
||||
- name: Install onnxruntime
|
||||
run: |
|
||||
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
|
||||
tar -zxvf onnxruntime-linux-x64-1.8.1.tgz
|
||||
pushd onnxruntime-linux-x64-1.8.1
|
||||
popd
|
||||
- name: Install opencv
|
||||
run: sudo apt-get install libopencv-dev
|
||||
- name: Install mmdeploy with onnxruntime backend
|
||||
run: |
|
||||
wget https://github.com/open-mmlab/mmdeploy/releases/download/v0.9.0/mmdeploy-0.9.0-linux-x86_64-onnxruntime1.8.1.tar.gz
|
||||
tar -zxvf mmdeploy-0.9.0-linux-x86_64-onnxruntime1.8.1.tar.gz
|
||||
- name: Download rust-mmdeploy
|
||||
run: git clone https://github.com/liu-mengyang/rust-mmdeploy
|
||||
- name: Download converted models
|
||||
run: git clone https://github.com/liu-mengyang/mmdeploy-converted-models --depth=1
|
||||
- name: Test rustdemo
|
||||
run: |
|
||||
pushd rust-mmdeploy
|
||||
export MMDEPLOY_DIR=/home/runner/work/mmdeploy/mmdeploy/mmdeploy-0.9.0-linux-x86_64-onnxruntime1.8.1/sdk
|
||||
export LD_LIBRARY_PATH=$MMDEPLOY_DIR/lib:$LD_LIBRARY_PATH
|
||||
export ONNXRUNTIME_DIR=/home/runner/work/mmdeploy/mmdeploy/onnxruntime-linux-x64-1.8.1
|
||||
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
||||
cargo build
|
||||
sh ci_test.sh
|
Loading…
Reference in New Issue