From 651b140e25899c86cc45461dbc0fbe5f53ab41cd Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Thu, 12 Mar 2026 22:23:59 +0200 Subject: [PATCH 01/12] test muls ubuntu 24 --- .github/workflows/OCV-PR-Linux.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 1df0008c..1287e26e 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -80,6 +80,11 @@ jobs: - version: '20.04' image: '20.04:20251015' limited_api: true + - version: '24.04_musl' + image: 'musl-24.04:20260312' + jpegxl: true + avif: true + avx2: true defaults: run: shell: bash From f34683c136b4d1f8b3d4c9ed98906410833484a5 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Wed, 25 Mar 2026 09:54:26 +0200 Subject: [PATCH 02/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 1287e26e..38282173 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -61,7 +61,7 @@ jobs: branch: ${{ fromJSON(needs.branch_eval.outputs.branches )}} include: - version: '24.04' - image: '24.04:20251127' + image: 'ubuntu-24.04:20251127' jpegxl: true avif: true avx2: true @@ -74,14 +74,14 @@ jobs: # jpegxl: true # avif: true - version: '22.04' - image: '22.04:20251015' + image: 'ubuntu-22.04:20251015' avif: true plugins: true - version: '20.04' - image: '20.04:20251015' + image: 'ubuntu-20.04:20251015' limited_api: true - - version: '24.04_musl' - image: 'musl-24.04:20260312' + - version: '24.04' + image: 'musl-1-2:20260325' jpegxl: true avif: true avx2: true @@ -89,7 +89,7 @@ jobs: run: shell: bash container: - image: 'quay.io/opencv-ci/opencv-ubuntu-${{ matrix.image }}' + image: 'quay.io/opencv-ci/opencv-${{ matrix.image }}' volumes: # NOTE: RU config # - /mnt/cache/git_cache:/opt/git_cache From 71283e9785ec10e22bb317bca52868550ee0a1fa Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Wed, 25 Mar 2026 10:00:11 +0200 Subject: [PATCH 03/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 38282173..44dd9d30 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -80,7 +80,7 @@ jobs: - version: '20.04' image: 'ubuntu-20.04:20251015' limited_api: true - - version: '24.04' + - version: '24.04_musl' image: 'musl-1-2:20260325' jpegxl: true avif: true From 6948176a3391ea4860562b3879a9c96d1b74fd75 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Thu, 26 Mar 2026 19:34:18 +0200 Subject: [PATCH 04/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 44dd9d30..70412363 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -81,7 +81,7 @@ jobs: image: 'ubuntu-20.04:20251015' limited_api: true - version: '24.04_musl' - image: 'musl-1-2:20260325' + image: 'musl-1-2:20260326' jpegxl: true avif: true avx2: true From 43e2adea3dbd8135ab718ce5bb033b5f9fea0b40 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Tue, 7 Apr 2026 21:26:51 +0300 Subject: [PATCH 05/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 70412363..d8f7fc90 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -43,6 +43,9 @@ jobs: Ubuntu: # runs-on: opencv-ru-lin-riscv runs-on: opencv-cn-lin-x86-64 + name: >- + Ubuntu (${{ matrix.version }}, + ${{ matrix.branch }}${{ contains(matrix.version, 'musl') && ', musl' || '' }}) needs: - branch_eval strategy: @@ -81,7 +84,7 @@ jobs: image: 'ubuntu-20.04:20251015' limited_api: true - version: '24.04_musl' - image: 'musl-1-2:20260326' + image: 'musl-1-2:20260407' jpegxl: true avif: true avx2: true From 149ef13dd0d0971fca10dfa298021e3f6b22507f Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Tue, 7 Apr 2026 22:35:39 +0300 Subject: [PATCH 06/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index d8f7fc90..e7abd036 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -44,8 +44,8 @@ jobs: # runs-on: opencv-ru-lin-riscv runs-on: opencv-cn-lin-x86-64 name: >- - Ubuntu (${{ matrix.version }}, - ${{ matrix.branch }}${{ contains(matrix.version, 'musl') && ', musl' || '' }}) + Ubuntu (${{ matrix.version }}, + ${{ matrix.branch }}${{ matrix.musl && ', musl' || '' }}) needs: - branch_eval strategy: @@ -83,11 +83,12 @@ jobs: - version: '20.04' image: 'ubuntu-20.04:20251015' limited_api: true - - version: '24.04_musl' + - version: '24.04' image: 'musl-1-2:20260407' jpegxl: true avif: true avx2: true + musl: true defaults: run: shell: bash From 830bb0370543e2bf8d0cd57b83bd7a11a99c2f61 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Tue, 7 Apr 2026 22:49:42 +0300 Subject: [PATCH 07/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index e7abd036..cf907917 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -70,6 +70,7 @@ jobs: avx2: true gphoto2: true aravis: true + cache_suffix: '24.04' # TODO: enable later # - version: '24.04_asan' # image: '24.04:20250505' @@ -80,11 +81,14 @@ jobs: image: 'ubuntu-22.04:20251015' avif: true plugins: true + cache_suffix: '22.04' - version: '20.04' image: 'ubuntu-20.04:20251015' limited_api: true + cache_suffix: '20.04' - version: '24.04' image: 'musl-1-2:20260407' + cache_suffix: '24.04_musl' jpegxl: true avif: true avx2: true @@ -102,8 +106,8 @@ jobs: # - vol_dnn_models:/opt/dnn-models # NOTE: CN config - /home/opencv-cn/git_cache:/opt/git_cache - - /home/opencv-cn/ci_cache/opencv/${{ matrix.version }}:/opt/.ccache - - /home/opencv-cn/binaries_cache/${{ matrix.version }}:/opt/binaries_cache + - /home/opencv-cn/ci_cache/opencv/${{ matrix.cache_suffix }}:/opt/.ccache + - /home/opencv-cn/binaries_cache/${{ matrix.cache_suffix }}:/opt/binaries_cache - /home/opencv-cn/dnn-models:/opt/dnn-models # NOTE: RU config # options: '--user root:root' From 8c7d05823d58d252721e62ff53b95bb06697110f Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Wed, 8 Apr 2026 08:43:22 +0300 Subject: [PATCH 08/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index cf907917..967ca5fb 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -45,7 +45,7 @@ jobs: runs-on: opencv-cn-lin-x86-64 name: >- Ubuntu (${{ matrix.version }}, - ${{ matrix.branch }}${{ matrix.musl && ', musl' || '' }}) + ${{ matrix.branch }}${{ matrix.libc == 'musl' && ', musl' || '' }}) needs: - branch_eval strategy: @@ -64,7 +64,9 @@ jobs: branch: ${{ fromJSON(needs.branch_eval.outputs.branches )}} include: - version: '24.04' - image: 'ubuntu-24.04:20251127' + ibc: 'glibc' + image: '24.04:20251127' + cache_key: '24.04' jpegxl: true avif: true avx2: true @@ -78,17 +80,23 @@ jobs: # jpegxl: true # avif: true - version: '22.04' - image: 'ubuntu-22.04:20251015' + libc: 'glibc' + image: '22.04:20251015' + cache_key: '22.04' avif: true plugins: true cache_suffix: '22.04' - version: '20.04' - image: 'ubuntu-20.04:20251015' + libc: 'glibc' + image: '20.04:20251015' + cache_key: '20.04' limited_api: true cache_suffix: '20.04' - version: '24.04' - image: 'musl-1-2:20260407' - cache_suffix: '24.04_musl' + libc: 'musl' + image: 'musl-1-2:20260408' + cache_key: '24.04_musl' + container_prefix: 'opencv-' jpegxl: true avif: true avx2: true @@ -97,7 +105,8 @@ jobs: run: shell: bash container: - image: 'quay.io/opencv-ci/opencv-${{ matrix.image }}' + image: >- + quay.io/opencv-ci/${{ matrix.container_prefix || 'opencv-ubuntu-' }}${{ matrix.image }} volumes: # NOTE: RU config # - /mnt/cache/git_cache:/opt/git_cache @@ -106,8 +115,8 @@ jobs: # - vol_dnn_models:/opt/dnn-models # NOTE: CN config - /home/opencv-cn/git_cache:/opt/git_cache - - /home/opencv-cn/ci_cache/opencv/${{ matrix.cache_suffix }}:/opt/.ccache - - /home/opencv-cn/binaries_cache/${{ matrix.cache_suffix }}:/opt/binaries_cache + - /home/opencv-cn/ci_cache/opencv/${{ matrix.cache_key }}:/opt/.ccache + - /home/opencv-cn/binaries_cache/${{ matrix.cache_key }}:/opt/binaries_cache - /home/opencv-cn/dnn-models:/opt/dnn-models # NOTE: RU config # options: '--user root:root' From 81de23a9f37f7560d41c21c64e2ed80f3e37e951 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Wed, 8 Apr 2026 08:59:11 +0300 Subject: [PATCH 09/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 967ca5fb..4e15b2b6 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -64,7 +64,7 @@ jobs: branch: ${{ fromJSON(needs.branch_eval.outputs.branches )}} include: - version: '24.04' - ibc: 'glibc' + libc: 'glibc' image: '24.04:20251127' cache_key: '24.04' jpegxl: true @@ -94,7 +94,7 @@ jobs: cache_suffix: '20.04' - version: '24.04' libc: 'musl' - image: 'musl-1-2:20260408' + image: 'musl-1-2:20260409' cache_key: '24.04_musl' container_prefix: 'opencv-' jpegxl: true From e9c341abca4c26a3089458f6b41d0614b9a21a7e Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Wed, 8 Apr 2026 09:14:33 +0300 Subject: [PATCH 10/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 4e15b2b6..59640fef 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -93,6 +93,17 @@ jobs: limited_api: true cache_suffix: '20.04' - version: '24.04' + branch: '4.x' + libc: 'musl' + image: 'musl-1-2:20260409' + cache_key: '24.04_musl' + container_prefix: 'opencv-' + jpegxl: true + avif: true + avx2: true + + - version: '24.04' + branch: '5.x' libc: 'musl' image: 'musl-1-2:20260409' cache_key: '24.04_musl' @@ -100,7 +111,6 @@ jobs: jpegxl: true avif: true avx2: true - musl: true defaults: run: shell: bash From b08242eaf9edef7b3c748dd8ece18fa29ba35a80 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Wed, 8 Apr 2026 09:19:38 +0300 Subject: [PATCH 11/12] fix --- .github/workflows/OCV-PR-Linux.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/OCV-PR-Linux.yaml b/.github/workflows/OCV-PR-Linux.yaml index 59640fef..cff5a17d 100644 --- a/.github/workflows/OCV-PR-Linux.yaml +++ b/.github/workflows/OCV-PR-Linux.yaml @@ -62,6 +62,8 @@ jobs: # TODO: enable later # - '24.04_asan' branch: ${{ fromJSON(needs.branch_eval.outputs.branches )}} + libc: + - 'glibc' include: - version: '24.04' libc: 'glibc' From 6299f451310d9d9e785f71b1395d4bddbb443e64 Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Thu, 30 Apr 2026 18:52:01 +0300 Subject: [PATCH 12/12] Create Dockerfile-musl --- docker/ubuntu/Dockerfile-musl | 169 ++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 docker/ubuntu/Dockerfile-musl diff --git a/docker/ubuntu/Dockerfile-musl b/docker/ubuntu/Dockerfile-musl new file mode 100644 index 00000000..51bf3f67 --- /dev/null +++ b/docker/ubuntu/Dockerfile-musl @@ -0,0 +1,169 @@ +# version: 20260409 +# Image name: quay.io/opencv-ci/opencv-musl-1-2 +FROM quay.io/pypa/musllinux_1_2_x86_64:latest + +ARG CCACHE_VERSION=3.7.9 +ARG FFMPEG_VERSION=6.1.1 +ARG FREETYPE_VERSION=2.13.3 +ARG LIBPNG_VERSION=1.6.48 +ARG VPX_VERSION=v1.15.1 +ARG NASM_VERSION=2.15.04 +ARG OPENSSL_VERSION=1_1_1w +ARG YASM_VERSION=1.3.0 +ARG AOM_VERSION=v3.12.1 +ARG AVIF_VERSION=v1.3.0 + +ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + +RUN apk add --no-cache \ + build-base \ + diffutils \ + cmake \ + bash \ + git \ + curl \ + wget \ + tar \ + xz \ + zlib-dev \ + xz-dev \ + nasm \ + yasm \ + pkgconfig \ + openssl-dev \ + libjpeg-turbo-dev \ + fontconfig-dev \ + freetype-dev \ + expat-dev \ + libpng-dev \ + alsa-lib-dev \ + musl-dev \ + ttf-dejavu \ + linux-headers \ + py3-requests \ + perl \ + ninja + +RUN apk del libpng-dev + +### libpng +RUN mkdir ~/libpng_sources && \ + cd ~/libpng_sources && \ + curl -O -L https://download.sourceforge.net/libpng/libpng-${LIBPNG_VERSION}.tar.gz && \ + tar -xf libpng-${LIBPNG_VERSION}.tar.gz && \ + cd libpng-${LIBPNG_VERSION} && \ + ./configure --prefix=/usr/local && \ + make && \ + make install && \ + cd .. && \ + rm -rf ~/libpng_sources + +### freetype +RUN mkdir ~/freetype_sources && \ + cd ~/freetype_sources && \ + curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \ + tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \ + cd freetype-${FREETYPE_VERSION} && \ + ./configure --prefix="/ffmpeg_build" --enable-freetype-config && \ + make && \ + make install && \ + cd .. && \ + rm -rf ~/freetype_sources + +### OpenSSL +RUN mkdir ~/openssl_sources && \ + cd ~/openssl_sources && \ + curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \ + tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \ + cd openssl-OpenSSL_${OPENSSL_VERSION} && \ + ./config --prefix="/ffmpeg_build" --openssldir="/ffmpeg_build" no-pinshared shared zlib && \ + make -j$(getconf _NPROCESSORS_ONLN) && \ + make install_sw && \ + cd .. && \ + rm -rf ~/openssl_build ~/openssl_sources + +### libvpx +RUN mkdir ~/libvpx_sources && \ + cd ~/libvpx_sources && \ + git clone --depth 1 -b ${VPX_VERSION} https://chromium.googlesource.com/webm/libvpx.git && \ + cd libvpx && \ + ./configure --prefix="/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \ + make -j$(getconf _NPROCESSORS_ONLN) && \ + make install && \ + cd .. && \ + rm -rf ~/libvpx_sources + + +### aom +RUN mkdir -p /tmp/aom_sources && \ + cd /tmp/aom_sources && \ + git clone --depth 1 -b ${AOM_VERSION} https://aomedia.googlesource.com/aom && \ + mkdir build && cd build && \ + cmake \ + -DCMAKE_C_COMPILER=$(dirname $(which g++))/gcc \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_TESTS=OFF \ + -DENABLE_EXAMPLES=OFF \ + ../aom && \ + make -j$(getconf _NPROCESSORS_ONLN) && \ + make install +### avif +RUN mkdir ~/avif_sources && \ + cd ~/avif_sources && \ + git clone -b ${AVIF_VERSION} https://github.com/AOMediaCodec/libavif.git && \ + mkdir build && cd build && \ + cmake -DCMAKE_INSTALL_PREFIX=/usr -DAVIF_CODEC_AOM=SYSTEM -DAVIF_LIBYUV=LOCAL -DAVIF_BUILD_APPS=OFF ../libavif && \ + make -j$(getconf _NPROCESSORS_ONLN) && \ + make install && \ + cd .. && \ + rm -rf ~/avif_sources + +### ffmpeg +RUN mkdir -p /ffmpeg_sources && \ + cd /ffmpeg_sources && \ + curl -LO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + tar -xf ffmpeg-${FFMPEG_VERSION}.tar.gz && \ + cd ffmpeg-${FFMPEG_VERSION} && \ + PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure \ + --prefix="/ffmpeg_build" \ + --extra-cflags="-I/ffmpeg_build/include" \ + --extra-ldflags="-L/ffmpeg_build/lib" \ + --enable-openssl \ + --enable-libvpx \ + --enable-shared \ + --enable-pic \ + --disable-indev=v4l2 \ + --disable-outdev=v4l2 && \ + make -j$(getconf _NPROCESSORS_ONLN) && \ + make install && \ + rm -rf /ffmpeg_sources + +### ccache +RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz && \ + tar -xf ccache-${CCACHE_VERSION}.tar.gz && \ + cd ccache-${CCACHE_VERSION} && \ + ./configure && \ + make -j$(getconf _NPROCESSORS_ONLN) && \ + make install && \ + cd .. && \ + rm -rf ccache-${CCACHE_VERSION}.tar.gz + +# user`s UID is 1000 for self-runner +RUN adduser -D -u 1000 -h /home/ci ci && \ + mkdir -p /home/ci /io && \ + chown -R ci:ci /home/ci /io && \ + chown -R ci:ci /ffmpeg_build && \ + # This calls in mutlibuild scripts and cannot be run without permissions + chown -R ci:ci /opt/_internal/pipx/venvs/auditwheel + +ENV HOME=/home/ci +WORKDIR /home/ci +USER ci + +RUN git config --global --add safe.directory /io +ENV PATH="/ffmpeg_build/bin:$PATH" +ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/ffmpeg_build/lib/pkgconfig +ENV LDFLAGS -L/ffmpeg_build/lib +ENV PATH "$HOME/bin:$PATH" +ENV LD_LIBRARY_PATH="/ffmpeg_build/lib:$LD_LIBRARY_PATH"