Skip to content

Commit

Permalink
Update workflows after renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
sovrasov committed Jan 15, 2025
1 parent 81d559c commit ba29428
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: pip install 'model_api/python/.[docs]'
run: pip install 'src/python/.[docs]'
- name: Install and Generate Doxygen
uses: mattnotmitt/doxygen-action@v1.9.8
- name: Build Docs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install clang-format
run: sudo apt-get install -y clang-format-10
- name: Install dependencies
run: pip install 'model_api/python/.[full]'
run: pip install 'src/python/.[full]'
- name: Run pre-commit checks
run: pre-commit run --all-files
Unit-Tests:
Expand All @@ -43,6 +43,6 @@ jobs:
with:
python-version: "3.9"
- name: Install dependencies
run: pip install 'model_api/python/.[tests,ovms]'
run: pip install 'src/python/.[tests,ovms]'
- name: Run python unit tests
run: pytest tests/python/unit
16 changes: 8 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
python -m pip install --upgrade build
- name: Build sdist
run: |
sed -i '/omz_tools/d' model_api/python/pyproject.toml
python -m build --sdist model_api/python/
sed -i '/omz_tools/d' src/python/pyproject.toml
python -m build --sdist src/python/
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: model_api/python/dist/*.tar.gz
path: src/python/dist/*.tar.gz
- name: Build wheel
run: |
sed -i '/omz_tools/d' model_api/python/pyproject.toml
python -m build --wheel model_api/python/
sed -i '/omz_tools/d' src/python/pyproject.toml
python -m build --wheel src/python/
- uses: actions/upload-artifact@v4
with:
name: artifact-wheel
path: model_api/python/dist/*.whl
path: src/python/dist/*.whl

publish_package:
name: Publish package
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: model_api/python/dist
path: src/python/dist
pattern: artifact-*
merge-multiple: true
# to determine where to publish the package distribution to PyPI or TestPyPI
Expand All @@ -67,7 +67,7 @@ jobs:
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: model_api/python/dist/*
file: src/python/dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_accuracy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install model_api/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu
pip install src/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu
- name: Prepare test data
run: |
source venv/bin/activate
Expand All @@ -37,7 +37,7 @@ jobs:
DATA=data pytest --data=./data tests/python/accuracy/test_YOLOv8.py
- name: Install CPP dependencies
run: |
sudo bash model_api/cpp/install_dependencies.sh
sudo bash src/cpp/install_dependencies.sh
- name: Build CPP Test
run: |
pip install nanobind==2.4.0
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install model_api/python/[tests,ovms] --extra-index-url https://download.pytorch.org/whl/cpu
pip install src/python/[tests,ovms] --extra-index-url https://download.pytorch.org/whl/cpu
- name: Prepare test data
run: |
source venv/bin/activate
python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json
- name: Run test
run: |
source venv/bin/activate
pytest --data=./data tests/python/funtional
pytest --data=./data tests/python/functional
CPP-Code-Quality:
name: CPP-Code-Quality
runs-on: ubuntu-latest
Expand All @@ -46,7 +46,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
# missingInclude: cppcheck can't find stl, openvino, opencv
other_options: --suppress=missingInclude -Imodel_api/cpp/models/include -Imodel_api/cpp/utils/include -Imodel_api/cpp/pipelines/include --check-config
other_options: --suppress=missingInclude -Isrc/cpp/models/include -Isrc/cpp/utils/include -Isrc/cpp/pipelines/include --check-config
CPP-Precommit:
runs-on: ubuntu-22.04
steps:
Expand All @@ -63,9 +63,9 @@ jobs:
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install model_api/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu
pip install src/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu
sudo bash model_api/cpp/install_dependencies.sh
sudo bash src/cpp/install_dependencies.sh
- name: Prepare test data
run: |
source venv/bin/activate
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
run: |
source venv/Scripts/activate
python -m pip install --upgrade pip
pip install model_api/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu
pip install src/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu
curl https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.6/windows/w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64.zip --output w_openvino_toolkit_windows.zip
unzip w_openvino_toolkit_windows.zip
rm w_openvino_toolkit_windows.zip
Expand All @@ -114,7 +114,7 @@ jobs:
shell: bash
run: |
mkdir build && cd build
MSYS_NO_PATHCONV=1 cmake ../examples/cpp/ -DOpenVINO_DIR=$GITHUB_WORKSPACE/w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64/runtime/cmake -DOpenCV_DIR=$GITHUB_WORKSPACE/opencv/opencv/build -DCMAKE_CXX_FLAGS=/WX -DENABLE_PY_BINDINGS=OFF
MSYS_NO_PATHCONV=1 cmake ../examples/cpp/ -DOpenVINO_DIR=$GITHUB_WORKSPACE/w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64/runtime/cmake -DOpenCV_DIR=$GITHUB_WORKSPACE/opencv/opencv/build -DCMAKE_CXX_FLAGS=/WX
cmake --build . --config Release -j $((`nproc`*2+2))
- name: Run sync sample
shell: cmd
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: serving_api
run: |
python -m pip install --upgrade pip
python -m pip install model_api/python/[ovms,tests]
python -m pip install src/python/[ovms,tests]
python -c "from model_api.models import DetectionModel; DetectionModel.create_model('ssd_mobilenet_v1_fpn_coco').save('ovms_models/ssd_mobilenet_v1_fpn_coco/1/ssd_mobilenet_v1_fpn_coco.xml')"
docker run -d --rm -v $GITHUB_WORKSPACE/ovms_models/:/models -p 8000:8000 openvino/model_server:latest --model_path /models/ssd_mobilenet_v1_fpn_coco/ --model_name ssd_mobilenet_v1_fpn_coco --rest_port 8000 --log_level DEBUG --target_device CPU
python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json
Expand Down

0 comments on commit ba29428

Please sign in to comment.