Custom build wheels #5
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: Custom build | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Build with specific tag' | |
| required: true | |
| default: '' | |
| jobs: | |
| Build: | |
| name: Build with_contrib ${{ matrix.with_contrib }} without_gui ${{ matrix.without_gui }} | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.9'] | |
| platform: [x64] | |
| with_contrib: [0, 1] | |
| without_gui: [0, 1] | |
| build_sdist: [0] | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| REPO_DIR: . | |
| PROJECT_SPEC: opencv-python | |
| MB_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} | |
| MB_ML_VER: _2_38 | |
| TRAVIS_BUILD_DIR: ${{ github.workspace }} | |
| CONFIG_PATH: travis_config.sh | |
| DOCKER_IMAGE: ghcr.io/loong64/opencv-python-manylinux_2_38-loongarch64:latest | |
| USE_CCACHE: 0 | |
| UNICODE_WIDTH: 32 | |
| PLAT: loongarch64 | |
| SDIST: ${{ matrix.build_sdist || 0 }} | |
| ENABLE_HEADLESS: ${{ matrix.without_gui }} | |
| ENABLE_CONTRIB: ${{ matrix.with_contrib }} | |
| VERSION: ${{ github.event.inputs.tag }} | |
| steps: | |
| - name: Cleanup | |
| run: find . -mindepth 1 -delete | |
| working-directory: ${{ github.workspace }} | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: opencv/opencv-python | |
| ref: ${{ env.VERSION }} | |
| submodules: false | |
| fetch-depth: 0 | |
| - name: Setup Qemu | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Patch build | |
| run: wget -qO - https://github.com/loong64/opencv-python/raw/refs/heads/master/multibuild_loong64.patch | patch -p1 | |
| - name: Build a package | |
| run: source scripts/build.sh | |
| - name: Saving a wheel accordingly to matrix | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} | |
| path: wheelhouse/opencv*.whl |