Merge branch 'android-ndk-r17b' into 'master'

Few updates to the CI

See merge request GNOME/glib!133
This commit is contained in:
Philip Withnall 2018-06-22 17:19:46 +00:00
commit 74cde71ceb
4 changed files with 26 additions and 18 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
@ -12,7 +12,7 @@ cache:
variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 2
fedora-meson-x86_64:
fedora-x86_64:
stage: build
except:
- tags
@ -31,13 +31,13 @@ fedora-meson-x86_64:
- "_build/meson-logs"
- "_coverage"
fedora-meson-android_ndk_r16_api21_arm64:
cross-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}"
@ -45,7 +45,7 @@ fedora-meson-android_ndk_r16_api21_arm64:
paths:
- "_build/meson-logs"
fedora-meson-mingw64:
cross-mingw64:
stage: build
except:
- tags

View File

@ -36,13 +36,13 @@ RUN dnf -y install \
zlib-devel \
&& dnf clean all
RUN pip3 install meson
COPY setup-android-ndk.sh .
RUN ./setup-android-ndk.sh
COPY cross_file_mingw64.txt /opt
RUN pip3 install meson==0.46.1
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user

View File

@ -2,10 +2,16 @@
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}" \
docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .
sudo docker run --rm \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
if [ "$1" = "--push" ]; then
docker login registry.gitlab.gnome.org
docker push $TAG
else
docker run --rm \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
fi

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'