-
Notifications
You must be signed in to change notification settings - Fork 1k
150 lines (141 loc) · 5.01 KB
/
Copy pathbuild_wheels_manylinux.yml
File metadata and controls
150 lines (141 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Manylinux
on:
pull_request:
branches:
- 4.x
- 5.x
paths-ignore:
- '.github/workflows/build_wheels_windows*'
- '.github/workflows/build_wheels_macos*'
- '.github/workflows/build_sdist.yml'
- '.github/workflows/release.yml'
workflow_call:
inputs:
rolling:
type: boolean
default: false
workflow_dispatch:
permissions:
contents: read
jobs:
Build:
runs-on: ${{ case(matrix.platform == 'aarch64', 'ubuntu-24.04-arm', 'ubuntu-24.04') }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
platform: [x86_64, aarch64]
manylinux: [2014, 2_28]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
include:
- platform: aarch64
manylinux: 2014
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20260725@sha256:bc553cbe81920f9157d0cf3abc282da7cb5502fa4dfc40018432adbb26844168
- platform: x86_64
manylinux: 2014
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20260725@sha256:b31dbd9260993812b011eeea543fe3bad30cd1803dd54963ffd74bb4b7e31f38
- platform: x86_64
manylinux: 2_28
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-x86-64:20260725@sha256:d818791d2190f3ab4dda1e4683feade139bb345b4511a8a5ed9caf9e5f660a29
- platform: aarch64
manylinux: 2_28
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-aarch64:20260725@sha256:ba83daf0ce7653bc43df249d06fa05b0e03dfa4e94d7b3146e8be317091edea2
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: ${{ matrix.manylinux }}
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }}
USE_CCACHE: 0
UNICODE_WIDTH: 32
PLAT: ${{ matrix.platform }}
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Setup environment
if: inputs.rolling == 'true' || github.event_name == 'workflow_dispatch'
run: |
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v7
with:
submodules: false
fetch-depth: 0
- name: Build a package
run: source scripts/build.sh
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v7
with:
name: build-${{ matrix.platform }}-${{ matrix.manylinux }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/opencv*.whl
Test:
needs: [Build]
runs-on: ${{ case(matrix.platform == 'aarch64', 'ubuntu-24.04-arm', 'ubuntu-24.04') }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
platform: [x86_64, aarch64]
manylinux: [2014, 2_28]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
NP_TEST_DEP_OLD: numpy==1.19.4
NP_TEST_DEP: numpy==2.2.6
NP_TEST_DEP_LATEST: numpy==2.5.0
CONFIG_PATH: travis_config.sh
PLAT: ${{ matrix.platform }}
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
DOCKER_TEST_IMAGE: ${{ case(matrix.platform == 'aarch64', 'quay.io/opencv-ci/multibuild-noble_arm64v8:2026-06-15', '') }}
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: |
case "$PYTHON_VERSION" in
3.8|3.9)
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_OLD)" >> $GITHUB_ENV
;;
3.10|3.11|3.12|3.13)
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV
;;
*)
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV
;;
esac
env:
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v8
with:
name: build-${{ matrix.platform }}-${{ matrix.manylinux }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Package installation and run tests
run: source scripts/install.sh