ci: Move the android cross file into the repository

Avoid having the txt file be inline bash which is inline
in yaml in the ci config.
This commit is contained in:
Jordan Petridis 2025-03-11 15:50:25 +02:00 committed by Tim-Philipp Müller
parent 58578a2f48
commit 8c67cb8e2d
2 changed files with 22 additions and 25 deletions

View file

@ -414,31 +414,7 @@ android arm64 fedora:
- 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:

View file

@ -0,0 +1,21 @@
[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'