feat: add object detector feature in modmesh #2606
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: nouse_install | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '34 17 * * *' | |
| jobs: | |
| nouse_install_ubuntu: | |
| if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && vars.MMGH_NIGHTLY == 'enable') }} | |
| name: nouse_install_${{ matrix.os }}_Release | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| JOB_CMAKE_ARGS: -DBUILD_QT=OFF -DUSE_CLANG_TIDY=OFF -DCMAKE_BUILD_TYPE=Release | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| fetch-depth: 1 | |
| - name: event name | |
| run: | | |
| echo "github.event_name: ${{ github.event_name }}" | |
| - name: dependency by apt | |
| run: | | |
| sudo apt-get -qqy update | |
| sudo apt-get -qy install \ | |
| sudo curl git build-essential make cmake libc6-dev gcc g++ \ | |
| python3 python3-dev python3-venv | |
| - name: dependency by pip | |
| run: | | |
| sudo pip3 install setuptools | |
| sudo pip3 install numpy pytest jsonschema flake8 | |
| - name: dependency by manual script | |
| run: sudo ${GITHUB_WORKSPACE}/contrib/dependency/install.sh pybind11 | |
| - name: show dependency | |
| # Copy the commands from contrib/dependency/showdep.sh | |
| run: | | |
| echo "gcc path: $(which gcc)" | |
| echo "gcc version: $(gcc --version)" | |
| echo "cmake path: $(which cmake)" | |
| echo "cmake version: $(cmake --version)" | |
| echo "python3 path: $(which python3)" | |
| echo "python3 version: $(python3 --version)" | |
| echo "python3-config --prefix: $(python3-config --prefix)" | |
| echo "python3-config --exec-prefix: $(python3-config --exec-prefix)" | |
| echo "python3-config --includes: $(python3-config --includes)" | |
| echo "python3-config --libs: $(python3-config --libs)" | |
| echo "python3-config --cflags: $(python3-config --cflags)" | |
| echo "python3-config --ldflags: $(python3-config --ldflags)" | |
| echo "pip3 path: $(which pip3)" | |
| python3 -c 'import numpy as np; print("np.__version__:", np.__version__, np.get_include())' | |
| echo "pytest path: $(which pytest)" | |
| echo "pytest version: $(pytest --version)" | |
| echo "clang-tidy path: $(which clang-tidy)" | |
| echo "clang-tidy version: $(clang-tidy -version)" | |
| echo "flake8 path: $(which flake8)" | |
| echo "flake8 version: $(flake8 --version)" | |
| - name: setup.py install build_ext | |
| run: | | |
| sudo python3 setup.py install build_ext \ | |
| --cmake-args="${JOB_CMAKE_ARGS} -DPYTHON_EXECUTABLE=$(which python3) -DUSE_PYTEST_HELPER_BINDING=ON" \ | |
| --make-args="VERBOSE=1" | |
| - name: pytest | |
| run: | | |
| rm -rf tmp/ | |
| mkdir -p tmp/ | |
| cp -a tests tmp/ | |
| cd tmp/ | |
| python3 -c 'import os; print(os.getcwd())' | |
| python3 -c "import modmesh; print(modmesh.__file__)" | |
| python3 -c "import _modmesh; print(_modmesh.__file__)" | |
| # The following command is the original commend, and it will fail on pytest == 8.0.0 . | |
| # pytest --rootdir=/tmp -v | |
| # Here is the issue and temporary solution: https://github.com/pytest-dev/pytest/issues/11781 | |
| # The alternative command to solve the issue is ```pytest --rootdir=. -v```. | |
| pytest --rootdir=. -v | |
| cd .. | |
| nouse_install_macos: | |
| if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && vars.MMGH_NIGHTLY == 'enable') }} | |
| name: nouse_install_${{ matrix.os }}_Release | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| JOB_CMAKE_ARGS: -DBUILD_QT=OFF -DUSE_CLANG_TIDY=OFF -DCMAKE_BUILD_TYPE=Release | |
| strategy: | |
| matrix: | |
| # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md | |
| os: [macos-15] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v1 | |
| with: | |
| fetch-depth: 1 | |
| - name: event name | |
| run: | | |
| echo "github.event_name: ${{ github.event_name }}" | |
| - name: dependency by brew | |
| run: | | |
| brew install pybind11 | |
| - name: dependency by pip | |
| run: | | |
| echo "which python3: $(which python3)" | |
| ls -al $(which python3) | |
| python3 -m pip -v install --break-system-packages --upgrade setuptools | |
| python3 -m pip -v install --break-system-packages --upgrade wheel | |
| # TODO: | |
| # This issue was linked to #213 | |
| # temporary remove pip upgrade, due to latest pip will let cmake | |
| # fail to find Numpy | |
| # python3 -m pip -v install --upgrade pip | |
| python3 -m pip -v install --break-system-packages --upgrade numpy pytest flake8 jsonschema | |
| - name: show dependency | |
| # Copy the commands from contrib/dependency/showdep.sh | |
| run: | | |
| echo "gcc path: $(which gcc)" | |
| echo "gcc version: $(gcc --version)" | |
| echo "cmake path: $(which cmake)" | |
| echo "cmake version: $(cmake --version)" | |
| echo "python3 path: $(which python3)" | |
| echo "python3 version: $(python3 --version)" | |
| echo "python3-config --prefix: $(python3-config --prefix)" | |
| echo "python3-config --exec-prefix: $(python3-config --exec-prefix)" | |
| echo "python3-config --includes: $(python3-config --includes)" | |
| echo "python3-config --libs: $(python3-config --libs)" | |
| echo "python3-config --cflags: $(python3-config --cflags)" | |
| echo "python3-config --ldflags: $(python3-config --ldflags)" | |
| echo "pip3 path: $(which pip3)" | |
| python3 -c 'import numpy as np; print("np.__version__:", np.__version__, np.get_include())' | |
| echo "pytest path: $(which pytest)" | |
| echo "pytest version: $(pytest --version)" | |
| echo "clang-tidy path: $(which clang-tidy)" | |
| echo "clang-tidy version: $(clang-tidy -version)" | |
| echo "flake8 path: $(which flake8)" | |
| echo "flake8 version: $(flake8 --version)" | |
| - name: setup.py install build_ext | |
| run: | | |
| # Using legacy setup.py install for build_ext with cmake args | |
| python3 setup.py install build_ext \ | |
| --cmake-args="${JOB_CMAKE_ARGS} -DPYTHON_EXECUTABLE=$(which python3) -DUSE_PYTEST_HELPER_BINDING=ON" \ | |
| --make-args="VERBOSE=1" | |
| - name: pytest | |
| run: | | |
| rm -rf tmp/ | |
| mkdir -p tmp/ | |
| cp -a tests tmp/ | |
| cd tmp/ | |
| python3 -c 'import os; print(os.getcwd())' | |
| python3 -c "import modmesh; print(modmesh.__file__)" | |
| python3 -c "import _modmesh; print(_modmesh.__file__)" | |
| # The following command is the original commend, and it will fail on pytest == 8.0.0 . | |
| # pytest --rootdir=/tmp -v | |
| # Here is the issue and temporary solution: https://github.com/pytest-dev/pytest/issues/11781 | |
| # The alternative command to solve the issue is ```pytest --rootdir=. -v``` . | |
| pytest --rootdir=. -v | |
| cd .. |