Skip to content

Commit 2e828e9

Browse files
committed
Wheels for Musllinux_1_2.
1 parent 81b4c07 commit 2e828e9

File tree

5 files changed

+187
-1
lines changed

5 files changed

+187
-1
lines changed

.github/workflows/build_wheels_macos_m1.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '.github/workflows/build_wheels_manylinux*'
1010
- '.github/workflows/build_wheels_windows*'
1111
- '.github/workflows/build_wheels_macos.yml'
12+
- '.github/workflows/build_wheels_musllinux*'
1213
release:
1314
types: [published, edited]
1415
schedule:

.github/workflows/build_wheels_manylinux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
paths-ignore:
99
- '.github/workflows/build_wheels_windows*'
1010
- '.github/workflows/build_wheels_macos*'
11+
- '.github/workflows/build_wheels_musllinux*'
1112
release:
1213
types: [published, edited]
1314
schedule:
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
name: Musllinux
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 4.x
7+
- 5.x
8+
paths-ignore:
9+
- '.github/workflows/build_wheels_windows*'
10+
- '.github/workflows/build_wheels_macos*'
11+
- '.github/workflows/build_wheels_manylinux*'
12+
release:
13+
types: [published, edited]
14+
schedule:
15+
- cron: '0 3 * * 6'
16+
workflow_dispatch:
17+
18+
19+
jobs:
20+
Build:
21+
runs-on: ${{ matrix.platform == 'aarch64' && 'opencv-cn-lin-arm64' || 'ubuntu-22.04' }}
22+
defaults:
23+
run:
24+
shell: bash
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
python-version: ['3.9']
29+
platform: [x86_64, aarch64]
30+
manylinux: [2014, 2_28]
31+
with_contrib: [0, 1]
32+
build_sdist: [0]
33+
include:
34+
- platform: aarch64
35+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-musllinux_1_2-aarch64:20251211
36+
- platform: x86_64
37+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-musllinux_1_2-x86-64:20251211
38+
env:
39+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
40+
REPO_DIR: .
41+
PROJECT_SPEC: opencv-python
42+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
43+
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
44+
MB_ML_VER: _1_2
45+
MB_ML_LIBC: musllinux
46+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
47+
CONFIG_PATH: travis_config.sh
48+
DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }}
49+
USE_CCACHE: 0
50+
UNICODE_WIDTH: 32
51+
PLAT: ${{ matrix.platform }}
52+
SDIST: ${{ matrix.build_sdist || 0 }}
53+
ENABLE_HEADLESS: 1
54+
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
55+
56+
steps:
57+
- name: Cleanup
58+
run: find . -mindepth 1 -delete
59+
working-directory: ${{ github.workspace }}
60+
- name: Setup environment
61+
run: |
62+
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
63+
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
64+
fi
65+
- name: Checkout
66+
uses: actions/checkout@v3
67+
with:
68+
submodules: false
69+
fetch-depth: 0
70+
71+
- name: Build a package
72+
run: source scripts/build.sh
73+
- name: Saving a wheel accordingly to matrix
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: wheel-${{ matrix.platform }}-${{ matrix.manylinux }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
77+
path: wheelhouse/opencv*.whl
78+
79+
Test:
80+
needs: [Build]
81+
runs-on: ${{ matrix.platform == 'aarch64' && 'opencv-cn-lin-arm64' || 'ubuntu-22.04' }}
82+
defaults:
83+
run:
84+
shell: bash
85+
strategy:
86+
fail-fast: false
87+
matrix:
88+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
89+
platform: [x86_64, aarch64]
90+
with_contrib: [0, 1]
91+
build_sdist: [0]
92+
93+
env:
94+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
95+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
96+
MB_ML_VER: _1_2
97+
MB_ML_LIBC: musllinux
98+
NP_TEST_DEP: numpy==1.19.5
99+
NP_TEST_DEP_LATEST: numpy==2.2.6
100+
CONFIG_PATH: travis_config.sh
101+
PLAT: ${{ matrix.platform }}
102+
SDIST: ${{ matrix.build_sdist || 0 }}
103+
ENABLE_HEADLESS: 1
104+
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
105+
steps:
106+
- name: Cleanup
107+
run: find . -mindepth 1 -delete
108+
working-directory: ${{ github.workspace }}
109+
- name: Checkout
110+
uses: actions/checkout@v3
111+
with:
112+
submodules: true
113+
fetch-depth: 0
114+
115+
- name: Setup Environment variables
116+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
117+
- name: Download a wheel accordingly to matrix
118+
uses: actions/download-artifact@v4
119+
with:
120+
name: wheel-${{ matrix.platform }}-${{ matrix.manylinux }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
121+
path: wheelhouse/
122+
- name: Package installation and run tests
123+
run: source scripts/install.sh
124+
125+
Release_rolling:
126+
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
127+
needs: [Build, Test]
128+
runs-on: ubuntu-22.04
129+
environment: opencv-python-rolling-release
130+
defaults:
131+
run:
132+
shell: bash
133+
steps:
134+
- uses: actions/download-artifact@v4
135+
with:
136+
path: wheelhouse/
137+
- name: Upload wheels for opencv_python_headless_rolling
138+
run: |
139+
python -m pip install twine
140+
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_ROLLING_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_ROLLING_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_python_headless_rolling-*
141+
- name: Upload wheels for opencv_contrib_python_headless_rolling
142+
run: |
143+
python -m pip install twine
144+
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_ROLLING_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_ROLLING_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_contrib_python_headless_rolling-*
145+
146+
Pre-release:
147+
if: github.event_name == 'release' && github.event.release.prerelease
148+
needs: [Build, Build_sdist, Test]
149+
runs-on: ubuntu-22.04
150+
environment: test-opencv-python-release
151+
defaults:
152+
run:
153+
shell: bash
154+
steps:
155+
- uses: actions/download-artifact@v4
156+
with:
157+
path: wheelhouse/
158+
159+
- name: Upload all wheels
160+
run: |
161+
python -m pip install twine
162+
python -m twine upload --repository testpypi -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_* wheelhouse/wheel-*/opencv-*
163+
164+
Release:
165+
if: github.event_name == 'release' && !github.event.release.prerelease
166+
needs: [Build, Build_sdist, Test]
167+
runs-on: ubuntu-22.04
168+
environment: opencv-python-release
169+
defaults:
170+
run:
171+
shell: bash
172+
steps:
173+
- uses: actions/download-artifact@v4
174+
with:
175+
path: wheelhouse/
176+
- name: Upload wheels for opencv_python_headless
177+
run: |
178+
python -m pip install twine
179+
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_python_headless-* wheelhouse/wheel-*/opencv-python-headless-*
180+
- name: Upload wheels for opencv_contrib_python_headless
181+
run: |
182+
python -m pip install twine
183+
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_contrib_python_headless-* wheelhouse/wheel-*/opencv-contrib-python-headless-*

.github/workflows/build_wheels_windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
paths-ignore:
99
- '.github/workflows/build_wheels_manylinux*'
1010
- '.github/workflows/build_wheels_macos*'
11+
- '.github/workflows/build_wheels_musllinux*'
1112
release:
1213
types: [published, edited]
1314
schedule:

0 commit comments

Comments
 (0)