1+ name : Custom build
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : ' Build with specific tag'
8+ required : true
9+ default : ' '
10+
11+ jobs :
12+ Build :
13+ name : Build with_contrib ${{ matrix.with_contrib }} without_gui ${{ matrix.without_gui }}
14+ runs-on : ubuntu-22.04
15+ defaults :
16+ run :
17+ shell : bash
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ python-version : ['3.9']
22+ platform : [x64]
23+ with_contrib : [0, 1]
24+ without_gui : [0, 1]
25+ build_sdist : [0]
26+ env :
27+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
28+ REPO_DIR : .
29+ PROJECT_SPEC : opencv-python
30+ MB_PYTHON_VERSION : ${{ matrix.python-version }}
31+ TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
32+ MB_ML_VER : _2_38
33+ TRAVIS_BUILD_DIR : ${{ github.workspace }}
34+ CONFIG_PATH : travis_config.sh
35+ DOCKER_IMAGE : ghcr.io/loong64/opencv-python-manylinux_2_38-loongarch64:latest
36+ USE_CCACHE : 0
37+ UNICODE_WIDTH : 32
38+ PLAT : loongarch64
39+ SDIST : ${{ matrix.build_sdist || 0 }}
40+ ENABLE_HEADLESS : ${{ matrix.without_gui }}
41+ ENABLE_CONTRIB : ${{ matrix.with_contrib }}
42+ VERSION : ${{ github.event.inputs.tag }}
43+ steps :
44+ - name : Cleanup
45+ run : find . -mindepth 1 -delete
46+ working-directory : ${{ github.workspace }}
47+ - name : Checkout
48+ uses : actions/checkout@v3
49+ with :
50+ repository : opencv/opencv-python
51+ ref : ${{ env.VERSION }}
52+ submodules : false
53+ fetch-depth : 0
54+ - name : Setup Qemu
55+ uses : docker/setup-qemu-action@v3
56+ - name : Patch build
57+ run : sed -i 's@docker pull@docker pull --platform linux/loong64@g' multibuild/travis_linux_steps.sh
58+ - name : Build a package
59+ run : source scripts/build.sh
60+ - name : Saving a wheel accordingly to matrix
61+ uses : actions/upload-artifact@v4
62+ with :
63+ name : wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
64+ path : wheelhouse/opencv*.whl
0 commit comments