mirror of
https://github.com/libretro/parallel-gx2.git
synced 2026-11-07 04:25:58 -10:00
ci: add Android arm64-v8a and x86_64 jobs
Wires up the two libretro android-cmake templates for the core. Three things had to be dealt with for the build to have a chance of getting anywhere: * the template passes the NDK toolchain as CMAKE_TOOLCHAIN_FILE, which would bypass vcpkg entirely and leave all 30 find_package() calls unsatisfied - the top-level CMakeLists now detects that and hands it to vcpkg as a chainload toolchain instead, keeping vcpkg's own toolchain in the primary slot, * the libretro target linked GL and X11 unconditionally on UNIX; Android has neither, so it links EGL/GLESv3/log/android there while keeping the shared link options (whole-archive resources, version script), * API_LEVEL 16 from the template is useless for C++20 code - raised to 24. The jobs are allow_failure for now: the whole vcpkg dependency set has never been built for a cross triplet, so expect the ports to need work (dbus is the obvious suspect) before the core itself even starts compiling.
This commit is contained in:
1 parent
77d435fd22
commit
98d994771f
6 files changed
+78
-11
No files matched your search
@@ -31,6 +31,10 @@ include:
|
||||
# Linux
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/linux-cmake.yml'
|
||||
################################## CELLULAR ################################
|
||||
# Android
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/android-cmake.yml'
|
||||
|
||||
# Stages for building
|
||||
stages:
|
||||
@@ -66,3 +70,44 @@ libretro-build-linux-aarch64:
|
||||
libx11-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev
|
||||
libxss-dev libxkbcommon-dev libwayland-dev wayland-protocols
|
||||
libudev-dev libdbus-1-dev libgcrypt20-dev
|
||||
|
||||
################################### CELLULAR #################################
|
||||
# Android is a fresh target for this core: unlike the Linux job it has to build
|
||||
# the whole vcpkg dependency set for a cross triplet, and none of it has run
|
||||
# before - so keep these from failing the pipeline while they are brought up.
|
||||
.core-defs-android:
|
||||
extends: .core-defs
|
||||
allow_failure: true
|
||||
# Same reason as the Linux job, plus a cross toolchain on top.
|
||||
timeout: 3h
|
||||
variables:
|
||||
# The template defaults to API 16, which is nowhere near enough for C++20.
|
||||
API_LEVEL: 24
|
||||
# Cemu's CMakeLists hands the template's NDK toolchain to vcpkg as a
|
||||
# chainload toolchain (see the comment there); this picks the triplet the
|
||||
# ports are built for.
|
||||
VCPKG_DEFAULT_TRIPLET: $VCPKG_TRIPLET
|
||||
CORE_ARGS: >-
|
||||
-DENABLE_LIBRETRO=ON
|
||||
-DENABLE_BLUEZ=OFF
|
||||
-DENABLE_FERAL_GAMEMODE=OFF
|
||||
-DENABLE_WAYLAND=OFF
|
||||
-DENABLE_DISCORD_RPC=OFF
|
||||
-DVCPKG_TARGET_TRIPLET=$VCPKG_TRIPLET
|
||||
-DVCPKG_HOST_TRIPLET=x64-linux
|
||||
|
||||
# Android aarch64
|
||||
android-arm64-v8a:
|
||||
extends:
|
||||
- .libretro-android-cmake-arm64-v8a
|
||||
- .core-defs-android
|
||||
variables:
|
||||
VCPKG_TRIPLET: arm64-android
|
||||
|
||||
# Android x86_64
|
||||
android-x86_64:
|
||||
extends:
|
||||
- .libretro-android-cmake-x86_64
|
||||
- .core-defs-android
|
||||
variables:
|
||||
VCPKG_TRIPLET: x64-android
|
||||
+13
-1
@@ -39,7 +39,19 @@ if (ENABLE_VCPKG)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Android: the libretro CI template passes the NDK toolchain as
|
||||
# CMAKE_TOOLCHAIN_FILE, which would bypass vcpkg entirely and leave every
|
||||
# find_package() below unsatisfied. Hand it to vcpkg as a chainload
|
||||
# toolchain instead and let vcpkg's own toolchain take the primary slot.
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES "android.toolchain.cmake$" AND NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
|
||||
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}" CACHE STRING "" FORCE)
|
||||
unset(CMAKE_TOOLCHAIN_FILE CACHE)
|
||||
set(CEMU_TARGET_ANDROID ON)
|
||||
endif()
|
||||
|
||||
if(CEMU_TARGET_ANDROID)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
elseif(APPLE)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_mac;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "glm",
|
||||
"version": "0.9.9.8",
|
||||
"port-version": 3,
|
||||
"description": "OpenGL Mathematics (GLM)",
|
||||
"homepage": "https://glm.g-truc.net",
|
||||
"license": "MIT"
|
||||
}
|
||||
+6
-1
@@ -105,7 +105,12 @@ if(ENABLE_LIBRETRO)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(cemu_libretro PRIVATE GL EGL X11)
|
||||
if(ANDROID)
|
||||
# No desktop GL and no X11 here - GLES/EGL plus the NDK libraries.
|
||||
target_link_libraries(cemu_libretro PRIVATE EGL GLESv3 log android)
|
||||
else()
|
||||
target_link_libraries(cemu_libretro PRIVATE GL EGL X11)
|
||||
endif()
|
||||
# Force all CemuResource symbols (imgui needs fontawesome from resource archive)
|
||||
target_link_options(cemu_libretro PRIVATE "LINKER:--whole-archive" $<TARGET_FILE:CemuResource> "LINKER:--no-whole-archive")
|
||||
target_link_options(cemu_libretro PRIVATE -z noexecstack)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"/usr/bin/c++" :
|
||||
{
|
||||
"hash" : "fee2b6f3203ea42c2ba4af5999c25cf8fb7b391d",
|
||||
"size" : 2221704,
|
||||
"timestamp" : 0
|
||||
},
|
||||
"/usr/bin/cc" :
|
||||
{
|
||||
"hash" : "62b2015dfd11aa851128c1d369160431085a64c8",
|
||||
"size" : 2222136,
|
||||
"timestamp" : 0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user