fix #40
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
| # This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
| # See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
| name: Python build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
| fail-fast: false | |
| # Set up a matrix to run the following 3 configurations: | |
| # 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator> | |
| # 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator> | |
| # 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator> | |
| # | |
| # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-22.04, macos-latest] | |
| build_type: [Release] | |
| include: | |
| - os: ubuntu-latest | |
| c_compiler: gcc | |
| cpp_compiler: g++ | |
| - os: ubuntu-latest | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| - os: ubuntu-22.04 | |
| c_compiler: gcc | |
| cpp_compiler: g++ | |
| - os: ubuntu-22.04 | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| - os: macos-latest | |
| c_compiler: clang | |
| cpp_compiler: clang++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dendency libraries (Ubuntu) | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt update | |
| sudo apt upgrade | |
| sudo apt install -y libopencv-dev g++ clang libfmt-dev \ | |
| build-essential libbz2-dev libdb-dev libreadline-dev libffi-dev libgdbm-dev liblzma-dev \ | |
| libncursesw5-dev libsqlite3-dev libssl-dev zlib1g-dev uuid-dev tk-dev | |
| - name: Install dependency libraries (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install opencv gcc fmt | |
| - name: Install Python | |
| run: | | |
| wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tar.xz | |
| tar xJf Python-3.13.0.tar.xz | |
| cd Python-3.13.0 | |
| ./configure | |
| make | |
| sudo make install | |
| - name: Update Setuptools (Mac) | |
| if: matrix.os == 'macos-latest' | |
| run: pip install --upgrade setuptools wheel | |
| - name: Install Python libraries | |
| run: pip install scenedetect pybind11 | |
| - name: Run setup.py | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| pip install . -v | |
| - name: Test | |
| run: python -c "import libshutoh; print(libshutoh.__version__)" |