mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 13:28:03 +02:00
Merge branch 'alatiera/android-image-test' into 'master'
ci: update the android CI image See merge request cairo/cairo!614
This commit is contained in:
commit
7fd0cd0a9c
9 changed files with 112 additions and 78 deletions
|
|
@ -16,7 +16,7 @@ workflow:
|
|||
variables:
|
||||
FDO_UPSTREAM_REPO: 'cairo/cairo'
|
||||
FDO_DISTRIBUTION_VERSION: '40'
|
||||
FDO_DISTRIBUTION_TAG: '2024-07-26-coverage.0'
|
||||
FDO_DISTRIBUTION_TAG: '2025-03-12-android.0'
|
||||
|
||||
# TODO: should probably get its own image at some point instead of reusing the GStreamer one
|
||||
# See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/.gitlab-image-tags.yml for latest
|
||||
|
|
@ -26,8 +26,11 @@ variables:
|
|||
DEFAULT_MESON_ARGS: >
|
||||
--default-library=both
|
||||
|
||||
RUST_STABLE: "1.80.0"
|
||||
RUSTUP_VERSION: "1.27.1"
|
||||
RUST_STABLE: "1.85.0"
|
||||
RUSTUP_VERSION: "1.28.1"
|
||||
|
||||
ANDROID_HOME: "/android/sdk"
|
||||
ANDROID_NDK_HOME: "/android/ndk"
|
||||
|
||||
stages:
|
||||
- prep
|
||||
|
|
@ -67,14 +70,16 @@ fedora image:
|
|||
- '.fdo.container-build@fedora'
|
||||
stage: 'prep'
|
||||
tags:
|
||||
- placeholder-job
|
||||
- kvm
|
||||
variables:
|
||||
FDO_DISTRIBUTION_PACKAGES: >
|
||||
binutils-gold
|
||||
meson
|
||||
ninja-build
|
||||
ccache
|
||||
gcc
|
||||
g++
|
||||
gperf
|
||||
zlib-devel
|
||||
expat-devel
|
||||
libpng-devel
|
||||
|
|
@ -101,8 +106,10 @@ fedora image:
|
|||
google-noto-emoji-color-fonts
|
||||
google-noto-sans-vf-fonts
|
||||
fonttools
|
||||
unzip
|
||||
util-linux
|
||||
poppler-utils
|
||||
python3-pip
|
||||
clang
|
||||
clang-analyzer
|
||||
clang-tools-extra
|
||||
|
|
@ -117,6 +124,7 @@ fedora image:
|
|||
--arch x86_64-unknown-linux-gnu &&
|
||||
bash .gitlab-ci/install-rust-tools.sh &&
|
||||
bash .gitlab-ci/install-grcov.sh &&
|
||||
bash .gitlab-ci/install-android-toolchain.sh $ANDROID_HOME $ANDROID_NDK_HOME &&
|
||||
rm -rf /root/.cargo /root/.cache # cleanup compilation dirs; binaries are installed now
|
||||
|
||||
.build fedora:
|
||||
|
|
@ -398,9 +406,8 @@ vs2019 shared x86:
|
|||
EXTRA_MESON_ARGS: '--default-library=shared'
|
||||
|
||||
android arm64 fedora:
|
||||
# TODO: should probably build our own image here some day
|
||||
# See https://gitlab.freedesktop.org/gstreamer/gstreamer/container_registry/7689 for current images
|
||||
image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/android-fedora:2020-10-22.0-master'
|
||||
extends:
|
||||
- '.fdo.distribution-image@fedora'
|
||||
stage: 'build'
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
||||
|
|
@ -408,37 +415,8 @@ android arm64 fedora:
|
|||
when: 'always'
|
||||
paths:
|
||||
- "build/meson-logs/*.txt"
|
||||
allow_failure: true
|
||||
before_script:
|
||||
- dnf install -y python3-pip gcc ninja-build gperf
|
||||
- pip3 install --user meson
|
||||
script:
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- |
|
||||
cat > android-cross-file.txt <<EOF
|
||||
[constants]
|
||||
ndk_path = '/android/ndk'
|
||||
toolchain = ndk_path + '/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android'
|
||||
api = '28'
|
||||
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'aarch64'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
sys_root = ndk_path + '/sysroot'
|
||||
c_link_args = ['-fuse-ld=gold']
|
||||
cpp_link_args = ['-fuse-ld=gold']
|
||||
|
||||
[binaries]
|
||||
c = toolchain + api + '-clang'
|
||||
cpp = toolchain + api + '-clang++'
|
||||
ar = toolchain + '-ar'
|
||||
strip = toolchain + '-strip'
|
||||
EOF
|
||||
- meson setup --cross-file android-cross-file.txt -Dpixman:a64-neon=disabled build
|
||||
- meson setup --cross-file .gitlab-ci/android-cross-file.txt -Dpixman:a64-neon=disabled build
|
||||
- meson compile --verbose -C build
|
||||
|
||||
macOS x86 host:
|
||||
|
|
|
|||
22
.gitlab-ci/android-cross-file.txt
Normal file
22
.gitlab-ci/android-cross-file.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[constants]
|
||||
ndk_path = '/android/ndk'
|
||||
ndk_bindir = ndk_path + '/toolchains/llvm/prebuilt/linux-x86_64/bin/'
|
||||
toolchain = ndk_bindir + 'aarch64-linux-android'
|
||||
api = '28'
|
||||
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'aarch64'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
sys_root = ndk_path + '/sysroot'
|
||||
c_ld = 'gold'
|
||||
cpp_ld = 'gold'
|
||||
|
||||
[binaries]
|
||||
c = toolchain + api + '-clang'
|
||||
cpp = toolchain + api + '-clang++'
|
||||
ar = ndk_bindir + 'llvm-ar'
|
||||
strip = ndk_bindir + 'llvm-strip'
|
||||
33
.gitlab-ci/install-android-toolchain.sh
Normal file
33
.gitlab-ci/install-android-toolchain.sh
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Copied from gstreamer/cerbero
|
||||
# https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/2a0f5829aa1b56e8d36ef36f9675845345d54542/ci/docker_android_setup.sh
|
||||
|
||||
set -eux
|
||||
|
||||
export ANDROID_HOME=$1
|
||||
export ANDROID_NDK_HOME=$2
|
||||
|
||||
mkdir -p /android/sources
|
||||
|
||||
curl -o /android/sources/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
|
||||
unzip /android/sources/android-ndk.zip -d ${ANDROID_NDK_HOME}/
|
||||
# remove the intermediate versioned directory
|
||||
mv ${ANDROID_NDK_HOME}/*/* ${ANDROID_NDK_HOME}/
|
||||
|
||||
curl -o /android/sources/android-sdk-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
|
||||
unzip /android/sources/android-sdk-tools.zip -d ${ANDROID_HOME}/
|
||||
mkdir -p ${ANDROID_HOME}/licenses
|
||||
|
||||
# Accept licenses. Values taken from:
|
||||
# $ANDROID_HOME/tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --licenses
|
||||
# cd $ANDROID_HOME
|
||||
# for f in licenses/*; do echo "echo \"$(cat $f | tr -d '\n')\" > \${ANDROID_HOME}/$f"; done
|
||||
echo "601085b94cd77f0b54ff86406957099ebe79c4d6" > ${ANDROID_HOME}/licenses/android-googletv-license
|
||||
echo "859f317696f67ef3d7f30a50a5560e7834b43903" > ${ANDROID_HOME}/licenses/android-sdk-arm-dbt-license
|
||||
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > ${ANDROID_HOME}/licenses/android-sdk-license
|
||||
echo "84831b9409646a918e30573bab4c9c91346d8abd" > ${ANDROID_HOME}/licenses/android-sdk-preview-license
|
||||
echo "33b6a2b64607f11b759f320ef9dff4ae5c47d97a" > ${ANDROID_HOME}/licenses/google-gdk-license
|
||||
echo "e9acab5b5fbb560a72cfaecce8946896ff6aab9d" > ${ANDROID_HOME}/licenses/mips-android-sysimage-license
|
||||
|
||||
rm -rf /android/sources
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
[wrap-file]
|
||||
directory = expat-2.6.0
|
||||
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-2.6.0.tar.xz
|
||||
source_filename = expat-2.6.0.tar.bz2
|
||||
source_hash = cb5f5a8ea211e1cabd59be0a933a52e3c02cc326e86a4d387d8d218e7ee47a3e
|
||||
patch_filename = expat_2.6.0-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.0-1/get_patch
|
||||
patch_hash = 7452665b0cf413f87fae1dc4d5c779bc2c8f0ccf3ba637140c9d46eacf521604
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.0-1/expat-2.6.0.tar.bz2
|
||||
wrapdb_version = 2.6.0-1
|
||||
directory = expat-2.6.4
|
||||
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.xz
|
||||
source_filename = expat-2.6.4.tar.bz2
|
||||
source_hash = a695629dae047055b37d50a0ff4776d1d45d0a4c842cf4ccee158441f55ff7ee
|
||||
patch_filename = expat_2.6.4-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.4-1/get_patch
|
||||
patch_hash = e4ffff014e06b805fbb36cd1e911e90829dc1e07301a3aee53231f9048758558
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.4-1/expat-2.6.4.tar.bz2
|
||||
wrapdb_version = 2.6.4-1
|
||||
|
||||
[provide]
|
||||
expat = expat_dep
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[wrap-file]
|
||||
directory = fontconfig-2.14.2
|
||||
source_url = https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.14.2.tar.xz
|
||||
source_filename = fontconfig-2.14.2.tar.xz
|
||||
source_hash = dba695b57bce15023d2ceedef82062c2b925e51f5d4cc4aef736cf13f60a468b
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fontconfig_2.14.2-1/fontconfig-2.14.2.tar.xz
|
||||
wrapdb_version = 2.14.2-1
|
||||
directory = fontconfig-2.16.0
|
||||
source_url = https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.16.0.tar.xz
|
||||
source_filename = fontconfig-2.16.0.tar.xz
|
||||
source_hash = 6a33dc555cc9ba8b10caf7695878ef134eeb36d0af366041f639b1da9b6ed220
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fontconfig_2.16.0-1/fontconfig-2.16.0.tar.xz
|
||||
wrapdb_version = 2.16.0-1
|
||||
|
||||
[provide]
|
||||
fontconfig = fontconfig_dep
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[wrap-file]
|
||||
directory = freetype-2.13.2
|
||||
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/freetype2_2.13.2-1/freetype-2.13.2.tar.xz
|
||||
source_filename = freetype-2.13.2.tar.xz
|
||||
source_hash = 12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d
|
||||
wrapdb_version = 2.13.2-1
|
||||
directory = freetype-2.13.3
|
||||
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/freetype2_2.13.3-1/freetype-2.13.3.tar.xz
|
||||
source_filename = freetype-2.13.3.tar.xz
|
||||
source_hash = 0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289
|
||||
wrapdb_version = 2.13.3-1
|
||||
|
||||
[provide]
|
||||
freetype2 = freetype_dep
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
[wrap-file]
|
||||
directory = glib-2.74.0
|
||||
source_url = https://download.gnome.org/sources/glib/2.74/glib-2.74.0.tar.xz
|
||||
source_filename = glib-2.74.0.tar.xz
|
||||
source_hash = 3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
|
||||
wrapdb_version = 2.74.0-1
|
||||
directory = glib-2.84.0
|
||||
source_url = https://download.gnome.org/sources/glib/2.84/glib-2.84.0.tar.xz
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/glib_2.84.0-1/glib-2.84.0.tar.xz
|
||||
source_filename = glib-2.84.0.tar.xz
|
||||
source_hash = f8823600cb85425e2815cfad82ea20fdaa538482ab74e7293d58b3f64a5aff6a
|
||||
wrapdb_version = 2.84.0-1
|
||||
|
||||
[provide]
|
||||
dependency_names = gthread-2.0, gobject-2.0, gmodule-no-export-2.0, gmodule-export-2.0, gmodule-2.0, glib-2.0, gio-2.0, gio-windows-2.0, gio-unix-2.0
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
[wrap-file]
|
||||
directory = libpng-1.6.43
|
||||
source_url = https://github.com/glennrp/libpng/archive/v1.6.43.tar.gz
|
||||
source_filename = libpng-1.6.43.tar.gz
|
||||
source_hash = fecc95b46cf05e8e3fc8a414750e0ba5aad00d89e9fdf175e94ff041caf1a03a
|
||||
patch_filename = libpng_1.6.43-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.43-1/get_patch
|
||||
patch_hash = 0e995446c607ef2e618fb561929acf91e4bdd8017d2e18a7a3b68ba41da345e6
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libpng_1.6.43-1/libpng-1.6.43.tar.gz
|
||||
wrapdb_version = 1.6.43-1
|
||||
directory = libpng-1.6.47
|
||||
source_url = https://github.com/glennrp/libpng/archive/v1.6.47.tar.gz
|
||||
source_filename = libpng-1.6.47.tar.gz
|
||||
source_hash = 631a4c58ea6c10c81f160c4b21fa8495b715d251698ebc2552077e8450f30454
|
||||
patch_filename = libpng_1.6.47-1_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.47-1/get_patch
|
||||
patch_hash = a21f619a39da40a215e6c0d51e92af173c14b5e958bad0c0069eb91a6b9b0a3d
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libpng_1.6.47-1/libpng-1.6.47.tar.gz
|
||||
wrapdb_version = 1.6.47-1
|
||||
|
||||
[provide]
|
||||
libpng = libpng_dep
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
[wrap-file]
|
||||
directory = pixman-0.43.4
|
||||
source_url = https://www.cairographics.org/releases/pixman-0.43.4.tar.gz
|
||||
source_filename = pixman-0.43.4.tar.gz
|
||||
source_hash = a0624db90180c7ddb79fc7a9151093dc37c646d8c38d3f232f767cf64b85a226
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pixman_0.43.4-1/pixman-0.43.4.tar.gz
|
||||
wrapdb_version = 0.43.4-1
|
||||
directory = pixman-0.44.2
|
||||
source_url = https://www.cairographics.org/releases/pixman-0.44.2.tar.gz
|
||||
source_filename = pixman-0.44.2.tar.gz
|
||||
source_hash = 6349061ce1a338ab6952b92194d1b0377472244208d47ff25bef86fc71973466
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pixman_0.44.2-1/pixman-0.44.2.tar.gz
|
||||
wrapdb_version = 0.44.2-1
|
||||
|
||||
[provide]
|
||||
pixman-1 = idep_pixman
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue