diff --git a/.github/workflows/Android_Build.yml b/.github/workflows/Android_Build.yml index 25106dce4..deab9fa9c 100644 --- a/.github/workflows/Android_Build.yml +++ b/.github/workflows/Android_Build.yml @@ -18,17 +18,14 @@ jobs: steps: - uses: actions/checkout@v4 - name: Fetch submodules - run: | - if [[ "$CODE_CHANGED" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so" ]; then - git submodule update --init --recursive - fi - - - name: Set BUILD_TYPE variable run: | echo "BUILD_TYPE=${{ matrix.build_type }}" >> $GITHUB_ENV echo "CODE_CHANGED=false" >> $GITHUB_ENV git diff --exit-code --quiet -- '*.cpp' '*.h' '*.hpp' || echo "CODE_CHANGED=true" >> $GITHUB_ENV git diff --exit-code --quiet -- submodule || echo "CODE_CHANGED=true" >> $GITHUB_ENV + if [[ "${{ env.CODE_CHANGED }}" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/x86_64/libAlber.so" ]; then + git submodule update --init --recursive + fi - name: Set up gradle caches uses: actions/cache@v4 @@ -36,13 +33,13 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - ~/src/pandroid/app/src/main/jniLibs/x86_64 + ${{ github.workspace }}/src/pandroid/app/src/main/jniLibs/x86_64 key: ${{ runner.os }}-pandroid-x86_64-${{ github.sha }} restore-keys: | ${{ runner.os }}-pandroid-x86_64- - name: Setup Vulkan SDK - if: ${{ env.CODE_CHANGED == 'true' }} + if: ${{ env.CODE_CHANGED == 'true' || env.ALBER_EXISTS == 'false' }} uses: humbletim/setup-vulkan-sdk@v1.2.0 with: vulkan-query-version: latest @@ -104,30 +101,34 @@ jobs: - uses: actions/checkout@v4 - name: Fetch submodules run: | + echo "BUILD_TYPE=${{ matrix.build_type }}" >> $GITHUB_ENV + echo "CODE_CHANGED=false" >> $GITHUB_ENV + git diff --exit-code --quiet -- '*.cpp' '*.h' '*.hpp' || echo "CODE_CHANGED=true" >> $GITHUB_ENV + git diff --exit-code --quiet -- submodule || echo "CODE_CHANGED=true" >> $GITHUB_ENV if [[ "${{ env.CODE_CHANGED }}" == "true" ]] || [ ! -f "./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so" ]; then git submodule update --init --recursive fi - - name: Set BUILD_TYPE variable - run: | - echo "BUILD_TYPE=${{ matrix.build_type }}" >> $GITHUB_ENV - echo "CODE_CHANGED=false" >> $GITHUB_ENV - git diff --exit-code --quiet -- '*.cpp' '*.h' '*.hpp' || echo "CODE_CHANGED=true" >> $GITHUB_ENV - git diff --exit-code --quiet -- submodule || echo "CODE_CHANGED=true" >> $GITHUB_ENV - - name: Set up gradle caches uses: actions/cache@v4 with: path: | ~/.gradle/caches ~/.gradle/wrapper - ~/src/pandroid/app/src/main/jniLibs/arm64-v8a + ${{ github.workspace }}/src/pandroid/app/src/main/jniLibs/arm64-v8a key: ${{ runner.os }}-pandroid-arm64-${{ github.sha }} restore-keys: | ${{ runner.os }}-pandroid-arm64- + - name: check libAlber exist + run: | + if [ -f "./src/pandroid/app/src/main/jniLibs/arm64-v8a/libAlber.so" ]; then + echo "ALBER_EXISTS=true" >> $GITHUB_ENV + else + echo "ALBER_EXISTS=false" >> $GITHUB_ENV + - name: Setup Vulkan SDK - if: ${{ env.CODE_CHANGED == 'true' }} + if: ${{ env.CODE_CHANGED == 'true' || env.ALBER_EXISTS == 'false' }} uses: humbletim/setup-vulkan-sdk@v1.2.0 with: vulkan-query-version: latest