The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: Add Android NDK builds

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
a04c45b0 cc8dbb4f

+58
+46
.gitlab-ci.yml
··· 21 21 FDO_DISTRIBUTION_VERSION: buster 22 22 FDO_DISTRIBUTION_TAG: "2019-04-28.0" 23 23 24 + # Variables for build and usage of Debian 10 (Buster) + Android NDK image 25 + .monado.debian:buster-ndk: 26 + variables: 27 + FDO_DISTRIBUTION_VERSION: buster 28 + FDO_DISTRIBUTION_TAG: "2019-04-28.1" 29 + FDO_REPO_SUFFIX: ndk 30 + 24 31 # Variables for build and usage of Arch Linux image 25 32 .monado.arch:rolling: 26 33 variables: ··· 74 81 # a list of packages to install 75 82 FDO_DISTRIBUTION_PACKAGES: "git gcc cmake meson ninja pkgconfig python3 diffutils patch doxygen graphviz eigen hidapi libxrandr mesa glslang vulkan-headers vulkan-icd-loader check glfw-x11 libusb opencv gtk3 ffmpeg v4l-utils qt5-base" 76 83 84 + # Debian Buster + the Android NDK in /opt/android-ndk 85 + # The NDK itself gets installed by .gitlab-ci/ndk:container_prep.sh 86 + ndk:container_prep: 87 + stage: container_prep 88 + extends: 89 + - .monado.debian:buster-ndk # local 90 + - .monado.container_base # local 91 + - .fdo.container-build@debian # from ci-templates 92 + variables: 93 + # Repo suffix is set in .monado.debian:buster-ndk 94 + # a list of packages to install 95 + FDO_DISTRIBUTION_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools" 96 + 77 97 format-and-spellcheck: 78 98 extends: 79 99 - .monado.debian:buster # local ··· 140 160 - .monado.build-meson # local 141 161 variables: 142 162 MESON_ARGS: -Ddocs=disabled 163 + 164 + # Base of Android NDK builds. 165 + # Takes the last :-delimited part of the name as the ABI to build for, 166 + # so you don't need to do anything other than "extends" in the job 167 + .monado.ndk:build-base: 168 + stage: build 169 + extends: 170 + - .monado.debian:buster-ndk # local 171 + - .fdo.suffixed-image@debian # from ci-templates 172 + variables: 173 + ANDROID_PLATFORM: 24 174 + script: 175 + - mkdir build 176 + - pushd build 177 + # This extracts the ABI from the job name 178 + - export ABI=$(echo $CI_JOB_NAME | cut --delimiter=":" -f 2) 179 + # Note we are pointing CMake to the host install of Eigen3 because it's header-only 180 + # and thus this is safe to do. 181 + - cmake -GNinja .. -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=$ABI -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3/ 182 + - ninja 183 + 184 + ndk:armeabi-v7a: 185 + extends: .monado.ndk:build-base 186 + 187 + ndk:arm64-v8a: 188 + extends: .monado.ndk:build-base 143 189 144 190 ### 145 191 # Pages
+6
.gitlab-ci/install-ndk.sh
··· 1 + #!/bin/sh 2 + VERSION=r21 3 + FN=android-ndk-${VERSION}-linux-x86_64.zip 4 + wget https://dl.google.com/android/repository/$FN 5 + unzip $FN -d /opt 6 + mv /opt/android-ndk-${VERSION} /opt/android-ndk
+6
.gitlab-ci/ndk:container_prep.sh
··· 1 + #!/bin/bash 2 + 3 + ( 4 + cd $(dirname $0) 5 + bash ./install-ndk.sh 6 + )