]> git.sesse.net Git - stockfish/commitdiff
Restore NDKv21 for GitHub Actions
authorppigazzini <pasquale.pigazzini@gmail.com>
Mon, 13 Jun 2022 20:08:01 +0000 (22:08 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Thu, 16 Jun 2022 05:03:52 +0000 (07:03 +0200)
GitHub updated the versions of NDK installed on the Actions runners
breaking the ARM tests.
Restore the NDKv21 using the GitHub suggested mitigation, see:
https://github.com/actions/virtual-environments/issues/5595

closes https://github.com/official-stockfish/Stockfish/pull/4077

No functional change

.github/workflows/stockfish.yml

index 33560d52b60b5f421d96ea81b58bce9c142414da..782e3f2b4420631aae5524f1f204dce72b94ade9 100644 (file)
@@ -5,7 +5,6 @@ on:
       - master
       - tools
       - github_ci
       - master
       - tools
       - github_ci
-      - github_ci_armv7
   pull_request:
     branches:
       - master
   pull_request:
     branches:
       - master
@@ -269,6 +268,12 @@ jobs:
       - name: Test armv8 build
         if: ${{ matrix.config.run_armv8_tests }}
         run: |
       - name: Test armv8 build
         if: ${{ matrix.config.run_armv8_tests }}
         run: |
+          ANDROID_ROOT=/usr/local/lib/android
+          ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
+          SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
+          echo "y" | $SDKMANAGER "ndk;21.4.7075529"
+          ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
+          ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
           export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
           export LDFLAGS="-static -Wno-unused-command-line-argument"
           make clean
           export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
           export LDFLAGS="-static -Wno-unused-command-line-argument"
           make clean
@@ -280,6 +285,12 @@ jobs:
       - name: Test armv7 build
         if: ${{ matrix.config.run_armv7_tests }}
         run: |
       - name: Test armv7 build
         if: ${{ matrix.config.run_armv7_tests }}
         run: |
+          ANDROID_ROOT=/usr/local/lib/android
+          ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
+          SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
+          echo "y" | $SDKMANAGER "ndk;21.4.7075529"
+          ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
+          ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
           export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
           export LDFLAGS="-static -Wno-unused-command-line-argument"
           make clean
           export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
           export LDFLAGS="-static -Wno-unused-command-line-argument"
           make clean
@@ -289,6 +300,12 @@ jobs:
       - name: Test armv7-neon build
         if: ${{ matrix.config.run_armv7_tests }}
         run: |
       - name: Test armv7-neon build
         if: ${{ matrix.config.run_armv7_tests }}
         run: |
+          ANDROID_ROOT=/usr/local/lib/android
+          ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
+          SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
+          echo "y" | $SDKMANAGER "ndk;21.4.7075529"
+          ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
+          ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
           export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
           export LDFLAGS="-static -Wno-unused-command-line-argument"
           make clean
           export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
           export LDFLAGS="-static -Wno-unused-command-line-argument"
           make clean