diff --git a/.github/workflows/Android_Build.yml b/.github/workflows/Android_Build.yml index d898c0296..b5a9836a2 100644 --- a/.github/workflows/Android_Build.yml +++ b/.github/workflows/Android_Build.yml @@ -41,6 +41,7 @@ jobs: ${{ runner.os }}-pandroid-x86_64- - name: Setup Vulkan SDK + if: ${{ env.CODE_CHANGED == 'true' }} uses: humbletim/setup-vulkan-sdk@v1.2.0 with: vulkan-query-version: latest @@ -55,7 +56,7 @@ jobs: - name: Configure CMake run: | - if [[ "${{ env.CODE_CHANGED }}" != "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so" ]; then + if [[ "${{ env.CODE_CHANGED }}" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so" ]; then echo "Code changed, rebuilding from scratch..." 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 fi @@ -67,7 +68,7 @@ jobs: rm -f ./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so fi - if [[ "${{ env.CODE_CHANGED }}" != "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so" ]; then + if [[ "${{ env.CODE_CHANGED }}" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so" ]; then # Apply patch for GLES compatibility git apply ./.github/gles.patch # Build the project with CMake @@ -124,6 +125,7 @@ jobs: ${{ runner.os }}-pandroid-arm64- - name: Setup Vulkan SDK + if: ${{ env.CODE_CHANGED == 'true' }} uses: humbletim/setup-vulkan-sdk@v1.2.0 with: vulkan-query-version: latest @@ -138,7 +140,7 @@ jobs: - name: Configure CMake run: | - if [[ "${{ env.CODE_CHANGED }}" != "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so" ]; then + if [[ "${{ env.CODE_CHANGED }}" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so" ]; then echo "Code changed, rebuilding from scratch..." 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" fi @@ -150,7 +152,7 @@ jobs: rm -f ./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so fi - if [[ "${{ env.CODE_CHANGED }}" != "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so" ]; then + if [[ "${{ env.CODE_CHANGED }}" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so" ]; then # Apply patch for GLES compatibility git apply ./.github/gles.patch