Skip to content

Commit

Permalink
build for android 21 (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Nov 10, 2023
1 parent 19c00b1 commit 09f5a1c
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv4_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -66,7 +66,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv4_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON -DOPENCV_EXTRA_FLAGS="-mno-outline-atomics" ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -75,7 +75,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-x86 && cd build-x86
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv4_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -84,7 +84,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-x86_64 && cd build-x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv4_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -104,31 +104,31 @@ jobs:
cd test
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-arm64-v8a
run: |
cd test
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-x86
run: |
cd test
mkdir build-x86 && cd build-x86
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-x86_64
run: |
cd test
mkdir build-x86_64 && cd build-x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: upload
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv3_cmake_options.txt` -DBUILD_opencv_world=OFF ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -171,7 +171,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv3_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_EXTRA_FLAGS="-mno-outline-atomics" ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -180,7 +180,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-x86 && cd build-x86
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv3_cmake_options.txt` -DBUILD_opencv_world=OFF ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -189,7 +189,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-x86_64 && cd build-x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv3_cmake_options.txt` -DBUILD_opencv_world=OFF ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -210,31 +210,31 @@ jobs:
cd test
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-arm64-v8a
run: |
cd test
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-x86
run: |
cd test
mkdir build-x86 && cd build-x86
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-x86_64
run: |
cd test
mkdir build-x86_64 && cd build-x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: upload
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv2_cmake_options.txt` -DBUILD_opencv_world=OFF ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -281,7 +281,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv2_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_EXTRA_FLAGS="-mno-outline-atomics" ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -290,7 +290,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-x86 && cd build-x86
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv2_cmake_options.txt` -DBUILD_opencv_world=OFF ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -299,7 +299,7 @@ jobs:
cd opencv-${{ env.OPENCV_VERSION }}
mkdir build-x86_64 && cd build-x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv2_cmake_options.txt` -DBUILD_opencv_world=OFF ..
cmake --build . -j 2
cmake --build . --target install
Expand All @@ -323,31 +323,31 @@ jobs:
cd test
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-arm64-v8a
run: |
cd test
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-x86
run: |
cd test
mkdir build-x86 && cd build-x86
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: test-x86_64
run: |
cd test
mkdir build-x86_64 && cd build-x86_64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-24 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DANDROID_ABI="x86_64" -DANDROID_PLATFORM=android-21 -DANDROID_CPP_FEATURES="no-rtti no-exceptions" \
-DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$GITHUB_WORKSPACE/${{ env.PACKAGENAME }}/sdk/native/jni ..
cmake --build . -j 2
- name: upload
Expand Down

0 comments on commit 09f5a1c

Please sign in to comment.