diff --git a/.github/workflows/Android_Build.yml b/.github/workflows/Android_Build.yml index 11811f8b..4ca1d2db 100644 --- a/.github/workflows/Android_Build.yml +++ b/.github/workflows/Android_Build.yml @@ -5,6 +5,10 @@ on: branches: - master pull_request: + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + CMAKE_BUILD_TYPE: Release jobs: x64: @@ -47,14 +51,14 @@ jobs: java-version: '17' - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DBUILD_HYDRA_CORE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DENABLE_VULKAN=0 -DENABLE_USER_BUILD=ON + run: cmake -B ${{github.workspace}}/build -DBUILD_HYDRA_CORE=1 -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DENABLE_VULKAN=0 -DENABLE_USER_BUILD=ON - name: Build run: | # Apply patch for GLES compatibility git apply ./.github/gles.patch # Build the project with CMake - cmake --build ${{github.workspace}}/build --config ${{ env.BUILD_TYPE }} + cmake --build ${{github.workspace}}/build --config ${{ env.CMAKE_BUILD_TYPE }} # Strip the generated library and move it to the appropriate location ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --strip-unneeded ./build/libAlber.so @@ -112,14 +116,14 @@ jobs: java-version: '17' - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DBUILD_HYDRA_CORE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DENABLE_VULKAN=0 -DENABLE_USER_BUILD=ON -DCMAKE_CXX_FLAGS="-march=armv8-a+crypto" + run: cmake -B ${{github.workspace}}/build -DBUILD_HYDRA_CORE=1 -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DENABLE_VULKAN=0 -DENABLE_USER_BUILD=ON -DCMAKE_CXX_FLAGS="-march=armv8-a+crypto" - name: Build run: | # Apply patch for GLES compatibility git apply ./.github/gles.patch # Build the project with CMake - cmake --build ${{github.workspace}}/build --config ${{ env.BUILD_TYPE }} + cmake --build ${{github.workspace}}/build --config ${{ env.CMAKE_BUILD_TYPE }} # Strip the generated library and move it to the appropriate location ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --strip-unneeded ./build/libAlber.so