ci: Also test the Android recovery environment
authorBart Van Assche <bvanassche@acm.org>
Thu, 27 Apr 2023 19:57:00 +0000 (12:57 -0700)
committerBart Van Assche <bvanassche@acm.org>
Thu, 27 Apr 2023 20:21:51 +0000 (13:21 -0700)
The android library is not available in the Android recovery
environment. Add a CI test for building and linking fio without the
android library.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
.github/workflows/ci.yml
ci/actions-build.sh
ci/actions-full-test.sh
ci/actions-install.sh
ci/actions-smoke-test.sh

index 06e03ce3e6f1332b59fefaad8c098953d4688048..dd2997f0753c2f8d3a1632fef80114ebd42fa792 100644 (file)
@@ -34,6 +34,9 @@ jobs:
         - build: android
           os: ubuntu-22.04
           arch: aarch64-linux-android32
+        - build: android-recovery
+          os: ubuntu-22.04
+          arch: aarch64-linux-android32
         - build: windows-cygwin-64
           os: windows-latest
           arch: x86_64
index 7146fb592b39258ec66823fc71e889e2f7041c4d..351b8d18aad07e13cbc53d0cc82937855598922a 100755 (executable)
@@ -12,7 +12,7 @@ main() {
 
     set_ci_target_os
     case "${CI_TARGET_BUILD}/${CI_TARGET_OS}" in
-        android/*)
+        android*/*)
             export UNAME=Android
             if [ -z "${CI_TARGET_ARCH}" ]; then
                 echo "Error: CI_TARGET_ARCH has not been set"
@@ -20,7 +20,9 @@ main() {
             fi
             NDK=$PWD/android-ndk-r24/toolchains/llvm/prebuilt/linux-x86_64/bin
             export PATH="${NDK}:${PATH}"
-            export LIBS="-landroid"
+            if [ "${CI_TARGET_BUILD}" = "android" ]; then
+                export LIBS="-landroid"
+            fi
             CC=${NDK}/${CI_TARGET_ARCH}-clang
             if [ ! -e "${CC}" ]; then
                 echo "Error: could not find ${CC}"
index d1675f6eb2f17c0d5e08142245e0cbdde2efcdc1..d2fb4201ae37ba1f4f9bcdce91acc8dcc3338733 100755 (executable)
@@ -3,7 +3,10 @@
 set -eu
 
 main() {
-    [ "${CI_TARGET_BUILD}" = android ] && return 0
+    case "${CI_TARGET_BUILD}" in
+       android*)
+           return 0;;
+    esac
 
     echo "Running long running tests..."
     export PYTHONUNBUFFERED="TRUE"
index 39395de8b7876b616f9ce8665ac7bc2ccedf79e6..0d73ac97e2167572f1dfeb6313263dd2f11b2250 100755 (executable)
@@ -94,12 +94,14 @@ install_windows() {
 }
 
 main() {
-    if [ "${CI_TARGET_BUILD}" = "android" ]; then
-       echo "Installing Android NDK..."
-       wget --quiet https://dl.google.com/android/repository/android-ndk-r24-linux.zip
-       unzip -q android-ndk-r24-linux.zip
-       return 0
-    fi
+    case "${CI_TARGET_BUILD}" in
+       android*)
+           echo "Installing Android NDK..."
+           wget --quiet https://dl.google.com/android/repository/android-ndk-r24-linux.zip
+           unzip -q android-ndk-r24-linux.zip
+           return 0
+           ;;
+    esac
 
     set_ci_target_os
 
index 3196f6a1ba33a0c2a1a8bfad0fdff3e60bb6e2f5..494462ac38a5c46d129d95c07146595e724c3878 100755 (executable)
@@ -3,7 +3,10 @@
 set -eu
 
 main() {
-    [ "${CI_TARGET_BUILD}" = "android" ] && return 0
+    case "${CI_TARGET_BUILD}" in
+       android*)
+           return 0;;
+    esac
 
     echo "Running smoke tests..."
     make test