diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01fb5071..e96b8166 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,4 @@ name: release -#on: pull_request on: push: tags: @@ -16,7 +15,7 @@ env: ENABLE_BITCODE: OFF ENABLE_ARC: OFF ENABLE_VISIBILITY: OFF - EMSCRIPTEN_VERSION: 3.1.28 + EMSCRIPTEN_VERSION: 6.0.12 permissions: contents: read @@ -1623,6 +1622,7 @@ jobs: - { msvc-version: vs2017, windows-version: 2022, toolset-version: v141, windows-sdk-version: 22621 } - { msvc-version: vs2019, windows-version: 2022, toolset-version: v142, windows-sdk-version: 22621 } - { msvc-version: vs2022, windows-version: 2022, toolset-version: v143, windows-sdk-version: 26100 } + - { msvc-version: vs2026, windows-version: 2025-vs2026, toolset-version: v145, windows-sdk-version: 26100 } include: - opencv-version: 5.0.0 os-compiler: @@ -1636,10 +1636,16 @@ jobs: windows-version: 2022 toolset-version: v143 windows-sdk-version: 26100 + - opencv-version: 5.0.0 + os-compiler: + msvc-version: vs2026 + windows-version: 2025-vs2026 + toolset-version: v145 + windows-sdk-version: 26100 runs-on: windows-${{ matrix.os-compiler.windows-version }} env: UseMultiToolTask: true - COMMON_CMAKE_OPTIONS: -T ${{ matrix.os-compiler.toolset-version }},host=x64 -DCMAKE_INSTALL_PREFIX=install + COMMON_CMAKE_OPTIONS: -G "${{ matrix.os-compiler.msvc-version == 'vs2026' && 'Visual Studio 18 2026' || 'Visual Studio 17 2022' }}" -T ${{ matrix.os-compiler.toolset-version }},host=x64 "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -DCMAKE_INSTALL_PREFIX=install steps: - uses: actions/checkout@v7 - uses: actions/download-artifact@v8 @@ -1690,7 +1696,7 @@ jobs: cmake --build . --config Release -j 4 cmake --build . --config Release --target install - name: build-arm64 - if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' + if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' || matrix.os-compiler.msvc-version == 'vs2026' run: | cd ${{ env.SOURCE_DIR }} mkdir build-arm64; cd build-arm64 @@ -1707,7 +1713,7 @@ jobs: Copy-Item -Verbose -Recurse -Path "${{ env.SOURCE_DIR }}\build-x64\install\*" -Destination "${{ env.PACKAGE_NAME }}\x64" 7z a -r ${{ env.PACKAGE_NAME }}.zip ${{ env.PACKAGE_NAME }} - name: package - if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' + if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' || matrix.os-compiler.msvc-version == 'vs2026' run: | mkdir ${{ env.PACKAGE_NAME }} mkdir ${{ env.PACKAGE_NAME }}/x86 @@ -1730,7 +1736,7 @@ jobs: cmake ${{ env.COMMON_CMAKE_OPTIONS }} -A x64,version=10.0.${{ matrix.os-compiler.windows-sdk-version }}.0 -DOpenCV_DIR="$env:GITHUB_WORKSPACE\${{ env.PACKAGE_NAME }}\x64" -DOpenCV_STATIC=ON .. cmake --build . --config Release -j 4 - name: test-arm64 - if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' + if: matrix.os-compiler.msvc-version == 'vs2019' || matrix.os-compiler.msvc-version == 'vs2022' || matrix.os-compiler.msvc-version == 'vs2026' run: | cd test mkdir build-arm64; cd build-arm64 @@ -1752,9 +1758,10 @@ jobs: os-ubuntu: - { ubuntu-id: 2204, ubuntu-version: 22.04 } - { ubuntu-id: 2404, ubuntu-version: 24.04 } + - { ubuntu-id: 2604, ubuntu-version: 26.04 } runs-on: ubuntu-${{ matrix.os-ubuntu.ubuntu-version }} env: - COMMON_CMAKE_OPTIONS: -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release + COMMON_CMAKE_OPTIONS: -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release steps: - uses: actions/checkout@v7 - uses: actions/download-artifact@v8 @@ -1802,14 +1809,20 @@ jobs: webassembly: needs: [setup] + name: "${{ matrix.arch.name }} (${{ matrix.opencv-version }})" runs-on: ubuntu-latest strategy: fail-fast: false matrix: opencv-version: [2.4.13.7, 3.4.20, 4.14.0, 5.0.0] + arch: + - { name: webassembly, flags: "" } + - { name: webassembly64, flags: "-m64" } env: COMMON_CMAKE_OPTIONS: | - -DCMAKE_TOOLCHAIN_FILE=../emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ + -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.arch.flags }}" \ -DCMAKE_INSTALL_PREFIX=install \ -DCMAKE_BUILD_TYPE=Release \ steps: @@ -1827,7 +1840,7 @@ jobs: run: | unzip -q opencv-mobile-${{ matrix.opencv-version }}.zip echo "SOURCE_DIR=opencv-mobile-${{ matrix.opencv-version }}" >> $GITHUB_ENV - echo "PACKAGE_NAME=opencv-mobile-${{ matrix.opencv-version }}-webassembly" >> $GITHUB_ENV + echo "PACKAGE_NAME=opencv-mobile-${{ matrix.opencv-version }}-${{ matrix.arch.name }}" >> $GITHUB_ENV - name: build run: | source emsdk/emsdk_env.sh @@ -1835,10 +1848,10 @@ jobs: patch -p1 -i ../patches/opencv-${{ matrix.opencv-version }}-unsafe-xadd.patch mkdir build && cd build cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=OFF -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=OFF -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: build-simd @@ -1847,10 +1860,10 @@ jobs: cd ${{ env.SOURCE_DIR }} mkdir build-simd && cd build-simd cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=OFF -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=OFF -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: build-threads @@ -1860,10 +1873,10 @@ jobs: patch -p1 -R -i ../patches/opencv-${{ matrix.opencv-version }}-unsafe-xadd.patch mkdir build-threads && cd build-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=ON -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=OFF -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=ON -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: build-simd-threads @@ -1872,10 +1885,10 @@ jobs: cd ${{ env.SOURCE_DIR }} mkdir build-simd-threads && cd build-simd-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCPU_BASELINE="" -DCPU_DISPATCH="" -DWITH_PTHREADS_PF=ON -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ - `cat ../options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. + -DCPU_BASELINE="" -DCPU_DISPATCH="" -DCV_ENABLE_INTRINSICS=ON -DBUILD_WASM_INTRIN_TESTS=OFF \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ + `cat ../options.txt` -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=ON -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON .. cmake --build . -j $(nproc) cmake --build . --target install - name: package @@ -1899,38 +1912,42 @@ jobs: run: echo "OPENCV_SUBDIR=lib/cmake/opencv5" >> $GITHUB_ENV - name: test run: | + source emsdk/emsdk_env.sh cd test mkdir build && cd build cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/basic/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: test-simd run: | + source emsdk/emsdk_env.sh cd test mkdir build-simd && cd build-simd cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=0 -msimd128" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -msimd128" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/simd/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: test-threads run: | + source emsdk/emsdk_env.sh cd test mkdir build-threads && cd build-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/threads/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: test-simd-threads run: | + source emsdk/emsdk_env.sh cd test mkdir build-simd-threads && cd build-simd-threads cmake ${{ env.COMMON_CMAKE_OPTIONS }} \ - -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ - -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -msimd128" \ + -DCMAKE_C_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ + -DCMAKE_CXX_FLAGS="${{ matrix.arch.flags }} -fno-rtti -fno-exceptions -pthread -s PTHREAD_POOL_SIZE=4 -msimd128" \ -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGE_NAME }}/simd-threads/${{ env.OPENCV_SUBDIR }} .. cmake --build . -j $(nproc) - name: upload diff --git a/README.md b/README.md index 25687bcd..76104baf 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ https://github.com/nihui/opencv-mobile/releases/latest -OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 packages are provided for VS2019 and VS2022 only. +OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 packages are provided for VS2019, VS2022 and VS2026 only.
| + |
|
Ubuntu-22.04 | @@ -251,11 +251,22 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0 [|
| Ubuntu-26.04 | +
+
+ [ |
||
| + |
|
VS2015 | @@ -299,12 +310,23 @@ OpenCV **5.0.0** packages require a C++17-capable compiler. Windows OpenCV 5.0.0|
| VS2026 |
+
+ [ |
+||
|
-WebAssembly | +WebAssembly (32-bit) |
[ |
+
| WebAssembly64 | +
+
+ [ |