ci: Update Android NDK to r17b

We should be testing latest NDK release but keep using API level 21 to
ensure GLib does not start using newer APIs. We could also later add a
runner for latest API level 28 which includes iconv API in Android's
libc so we don't need GNU libiconv anymore.
This commit is contained in:
Xavier Claessens 2018-06-22 10:39:44 -04:00
parent 250205a94b
commit 9a76e08ae1
3 changed files with 12 additions and 10 deletions

View File

@ -1,4 +1,4 @@
image: registry.gitlab.gnome.org/gnome/glib/master:v3
image: registry.gitlab.gnome.org/gnome/glib/master:v4
stages:
- build
@ -31,13 +31,13 @@ fedora-meson-x86_64:
- "_build/meson-logs"
- "_coverage"
fedora-meson-android_ndk_r16_api21_arm64:
fedora-meson-android_api21_arm64:
stage: build
except:
- tags
script:
# FIXME: add --werror
- meson --cross-file=/opt/cross-file-android_ndk_r16_api21_arm64.txt -Diconv=gnu -Dinternal_pcre=true --buildtype debug _build
- meson --cross-file=/opt/cross_file_android_api21_arm64.txt -Diconv=gnu -Dinternal_pcre=true --buildtype debug _build
- ninja -C _build
artifacts:
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"

View File

@ -2,7 +2,7 @@
set -e
TAG="registry.gitlab.gnome.org/gnome/glib/master:v1"
TAG="registry.gitlab.gnome.org/gnome/glib/master:v4"
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .

View File

@ -24,16 +24,18 @@ set -e
cd /opt
# Download Android NDK
wget --quiet https://dl.google.com/android/repository/android-ndk-r16-linux-x86_64.zip
echo "5b9ec70eac78f6cef8572dff9a133c9b18c83155dc6d980237a6925df4ae65b7b2adb3d8ea55b3ce9f3f75868f20eefdb8c87da110683c2dd1a1a27c44dc5b91 android-ndk-r16-linux-x86_64.zip" | sha512sum -c
unzip android-ndk-r16-linux-x86_64.zip
rm android-ndk-r16-linux-x86_64.zip
ANDROID_NDK_VERSION="r17b"
ANDROID_NDK_SHA512="062fac12f747730f5563995089a8b4abab683fbbc621aa8582fdf35fe327daee5d69ed2437af257c10ec4ef54ecd3805a8f134a1400eb8f34ee76f55c8dc9ae9"
wget --quiet https://dl.google.com/android/repository/android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip
echo "$ANDROID_NDK_SHA512 android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip" | sha512sum -c
unzip android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip
rm android-ndk-$ANDROID_NDK_VERSION-linux-x86_64.zip
# Setup cross build env
export ANDROID_HOST=aarch64-linux-android
export ANDROID_BUILD=linux-x86_64
export ANDROID_ARCH=arm64
export ANDROID_NDK=/opt/android-ndk-r16
export ANDROID_NDK=/opt/android-ndk-$ANDROID_NDK_VERSION
export ANDROID_VERSION=21
export ANDROID_TOOLCHAIN_VERSION=4.9
export ANDROID_SYSROOT=$ANDROID_NDK/platforms/android-$ANDROID_VERSION/arch-$ANDROID_ARCH
@ -80,7 +82,7 @@ EOM
chmod +x $PKG_CONFIG
# Create a cross file that can be passed to meson
cat > /opt/cross-file-android_ndk_r16_api21_arm64.txt <<- EOM
cat > /opt/cross_file_android_api21_arm64.txt <<- EOM
[host_machine]
system = 'android'
cpu_family = 'arm64'