-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ci: Run tests against Android NDK #15243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sp1ritCS
wants to merge
5
commits into
mesonbuild:master
Choose a base branch
from
sp1ritCS:android-ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
934a49d
env2mfile: Extend available binary tools for android
sp1ritCS 7d108e5
env2mfile: Add '-Wl,--build-id=sha1' link arg to Android
sp1ritCS 3717010
tests: Update error checks when running w/o pkg-config
sp1ritCS 227d14d
tests: add support for 'optionsfile.ini'
sp1ritCS a02c3a5
ci: Run tests against Android NDK
sp1ritCS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "base_image": "debian:sid", | ||
| "args": [ | ||
| "--cross", "/opt/android/meson/android-${ANDROID_NDKVER}-androideabi${ANDROID_TARGET}-armv7a-cross.json", | ||
| "--cross", "/opt/android/meson/android-${ANDROID_NDKVER}-android${ANDROID_TARGET}-aarch64-cross.json", | ||
| "--cross", "/opt/android/meson/android-${ANDROID_NDKVER}-android${ANDROID_TARGET}-i686-cross.json", | ||
| "--cross", "/opt/android/meson/android-${ANDROID_NDKVER}-android${ANDROID_TARGET}-x86_64-cross.json", | ||
| "--cross", "/opt/android/meson/android-${ANDROID_NDKVER}-android35-riscv64-cross.txt" | ||
| ], | ||
| "env": { | ||
| "ANDROID_HOME": "/opt/android", | ||
| "ANDROID_SDKVER": "36.1.0", | ||
| "ANDROID_NDKVER": "29.0.14206865", | ||
| "ANDROID_TARGET": "24", | ||
| "CI": "1", | ||
| "MESON_CI_JOBNAME": "android-cross" | ||
| }, | ||
| "needs_meson_in_install": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| source /ci/common.sh | ||
| source /ci/env_vars.sh | ||
|
|
||
| export DEBIAN_FRONTEND=noninteractive | ||
| export LANG='C.UTF-8' | ||
|
|
||
| apt-get -y update | ||
| apt-get -y upgrade | ||
|
|
||
| pkgs=( | ||
| git jq ninja-build python3-pip sdkmanager | ||
| ) | ||
|
|
||
| apt-get -y install "${pkgs[@]}" | ||
|
|
||
| install_minimal_python_packages | ||
|
|
||
| # cleanup | ||
| apt-get -y clean | ||
| apt-get -y autoclean | ||
|
|
||
| # sdk install | ||
|
|
||
| set -x | ||
|
|
||
| if [[ -z $ANDROID_HOME || -z $ANDROID_SDKVER || -z $ANDROID_NDKVER ]]; then | ||
| echo "ANDROID_HOME, ANDROID_SDKVER and ANDROID_NDKVER env var must be set!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| mkdir -p ${HOME}/.android | ||
| # there are currently zero user repos | ||
| echo 'count=0' > ${HOME}/.android/repositories.cfg | ||
| cat <<EOF >> ${HOME}/.android/sites-settings.cfg | ||
| @version@=1 | ||
| @disabled@https\://dl.google.com/android/repository/extras/intel/addon.xml=disabled | ||
| @disabled@https\://dl.google.com/android/repository/glass/addon.xml=disabled | ||
| @disabled@https\://dl.google.com/android/repository/sys-img/android/sys-img.xml=disabled | ||
| @disabled@https\://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml=disabled | ||
| @disabled@https\://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml=disabled | ||
| @disabled@https\://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml=disabled | ||
| EOF | ||
|
|
||
| ANDROID_SDKMAJOR=${ANDROID_SDKVER%%.*} | ||
|
|
||
| # accepted licenses | ||
|
|
||
| mkdir -p $ANDROID_HOME/licenses/ | ||
|
|
||
| cat << EOF > $ANDROID_HOME/licenses/android-sdk-license | ||
|
|
||
| 8933bad161af4178b1185d1a37fbf41ea5269c55 | ||
|
|
||
| d56f5187479451eabf01fb78af6dfcb131a6481e | ||
|
|
||
| 24333f8a63b6825ea9c5514f83c2829b004d1fee | ||
| EOF | ||
|
|
||
| cat <<EOF > $ANDROID_HOME/licenses/android-sdk-preview-license | ||
|
|
||
| 84831b9409646a918e30573bab4c9c91346d8abd | ||
| EOF | ||
|
|
||
| cat <<EOF > $ANDROID_HOME/licenses/android-sdk-preview-license-old | ||
|
|
||
| 79120722343a6f314e0719f863036c702b0e6b2a | ||
|
|
||
| 84831b9409646a918e30573bab4c9c91346d8abd | ||
| EOF | ||
|
|
||
| cat <<EOF > $ANDROID_HOME/licenses/intel-android-extra-license | ||
|
|
||
| d975f751698a77b662f1254ddbeed3901e976f5a | ||
| EOF | ||
|
|
||
| sdkmanager --sdk_root "${ANDROID_HOME}" \ | ||
| "ndk;${ANDROID_NDKVER}" | ||
|
|
||
| kernel=$(uname -s) | ||
| arch=$(uname -m) | ||
|
|
||
| tee "${ANDROID_HOME}/toolchain.cross" <<EOF | ||
| [constants] | ||
| toolchain='${ANDROID_HOME}/ndk/${ANDROID_NDKVER}/toolchains/llvm/prebuilt/${kernel,,}-${arch}' | ||
| EOF | ||
|
|
||
| /meson_private/meson.py env2mfile --android -o "${ANDROID_HOME}/meson/" | ||
| find "${ANDROID_HOME}/meson/" -exec sh -c 'for cf; do jq -nr --arg file "$cf" "{ \"file\": \$file, \"env\": [], \"tests\": [\"common\", \"failing-meson\", \"failing-build\", \"platform-android\"] }" > "${cf%%.txt}.json"; done' sh {} + | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.