runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
# MO requirements
pip install -r requirements.txt
pip install -r requirements_dev.txt
+ # requrements for CMake
+ sudo apt --assume-yes install libusb-1.0-0-dev
working-directory: model-optimizer
- name: Pylint
run: pylint -d C,R,W mo/ mo.py extensions/
working-directory: model-optimizer
+ - name: CMake
+ run: |
+ mkdir build
+ cd build
+ cmake ..
+
- name: UT
run: |
export PYTHONPATH=$PYTHONPATH:`pwd`
--- /dev/null
+# Copyright (C) 2018-2020 Intel Corporation
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# install
+ie_cpack_add_component(model_optimizer REQUIRED)
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/automation/version.txt.in"
+ "${CMAKE_CURRENT_SOURCE_DIR}/version.txt"
+ @ONLY)
+
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
+ DESTINATION deployment_tools/model_optimizer
+ USE_SOURCE_PERMISSIONS
+ COMPONENT model_optimizer
+ PATTERN ".*" EXCLUDE
+ PATTERN "automation" EXCLUDE
+ PATTERN "requirements_dev.txt" EXCLUDE
+ PATTERN "README.md" EXCLUDE
+ PATTERN "CMakeLists.txt" EXCLUDE
+
+ PATTERN "extensions/front/caffe/CustomLayersMapping.xml" EXCLUDE
+ PATTERN "mo/utils/convert.py" EXCLUDE
+ PATTERN "mo/utils/unittest" EXCLUDE
+
+ REGEX ".*__pycache__.*" EXCLUDE
+ REGEX ".*\\.pyc$" EXCLUDE
+ REGEX ".*\\.swp" EXCLUDE
+ REGEX ".*\\.DS_Store$" EXCLUDE
+ REGEX ".*_test\.py$" EXCLUDE
+ )
class TestingVersion(unittest.TestCase):
def test_unknown_version(self):
- self.assertEqual(get_version(), "unknown version")
+ self.assertNotEqual(get_version(), "unknown version")
@patch('os.path.isfile')
@mock.patch('builtins.open', new_callable=mock_open, create=True, read_data='2021.1.0-1028-55e4d5673a8')