mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Libretro: GitLab CI for the libretro buildbot (linux x64 + aarch64) (#9)
The libretro buildbot's linux nightlies are driven by a per-core
.gitlab-ci.yml on the git.libretro.com mirror, not by libretro-super
recipes — this adds one, modeled on flycast's, building yaps2_libretro.so
for linux x86_64 and aarch64 via the linux-cmake ci-templates.
The buildbot containers ship neither Clang nor the pinned third-party
libraries, so the job installs clang-17/lld-17 from apt.llvm.org and
reuses build-dependencies-runner.sh for the dependency set. The
ci-templates drive 'cmake --build --target ${CORENAME}_libretro', so a
yaps2_libretro custom target aliasing pcsx2-libretro is added; the .so is
picked up from the pcsx2-libretro/ build subdirectory via EXTRA_PATH.
Inert on GitHub — the GitHub Actions nightly is unchanged.
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
# DESCRIPTION: GitLab CI/CD for libRetro (NOT FOR GitLab-proper)
|
||||
#
|
||||
# Builds yaps2_libretro.so on the libretro buildbot (git.libretro.com mirror)
|
||||
# for Linux x86_64 and aarch64. Inert on GitHub — the GitHub Actions
|
||||
# workflows under .github/workflows/ are the project's own CI.
|
||||
#
|
||||
# The buildbot containers ship no Clang and none of the pinned third-party
|
||||
# libraries, so before_script installs clang-17 from apt.llvm.org and reuses
|
||||
# .github/workflows/scripts/linux/build-dependencies-runner.sh to build the
|
||||
# same dependency set the GitHub nightly uses (shaderc, SDL3, zstd, lz4, ...).
|
||||
|
||||
##############################################################################
|
||||
################################# BOILERPLATE ################################
|
||||
##############################################################################
|
||||
|
||||
# Core definitions
|
||||
.core-defs:
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
CORENAME: yaps2
|
||||
# The core is emitted in the pcsx2-libretro/ subdirectory of the build
|
||||
# tree; the ci-templates pick it up from $BUILD_DIR/$EXTRA_PATH/.
|
||||
EXTRA_PATH: pcsx2-libretro
|
||||
CORE_ARGS: >-
|
||||
-DCMAKE_C_COMPILER=clang-17
|
||||
-DCMAKE_CXX_COMPILER=clang++-17
|
||||
-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld-17
|
||||
-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld-17
|
||||
-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld-17
|
||||
-DCMAKE_PREFIX_PATH=$CI_PROJECT_DIR/.deps
|
||||
-DENABLE_LIBRETRO=ON
|
||||
-DENABLE_QT_UI=OFF
|
||||
-DENABLE_SDL_FRONTEND=OFF
|
||||
-DENABLE_GSRUNNER=OFF
|
||||
-DENABLE_TESTS=OFF
|
||||
-DENABLE_RECOMPILER_TEST_HOOKS=OFF
|
||||
-DENABLE_SETCAP=OFF
|
||||
-DUSE_BACKTRACE=OFF
|
||||
-DX11_API=OFF
|
||||
-DWAYLAND_API=OFF
|
||||
-DDISABLE_ADVANCE_SIMD=TRUE
|
||||
-DOVERRIDE_HOST_PAGE_SIZE=4096
|
||||
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
|
||||
|
||||
.core-defs-linux:
|
||||
extends: .core-defs
|
||||
before_script:
|
||||
# The ci-template's script builds with `-j $NUMPROC`; its before_script
|
||||
# (which normally sets it) is replaced by this one.
|
||||
- export NUMPROC=$(($(nproc) / 2)); [ "$NUMPROC" -lt 1 ] && export NUMPROC=1
|
||||
- apt-get update
|
||||
- >-
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install
|
||||
build-essential cmake curl git ninja-build nasm pkg-config wget
|
||||
gnupg lsb-release software-properties-common
|
||||
zlib1g-dev libaio-dev libasound2-dev libcurl4-openssl-dev
|
||||
libdbus-1-dev libdrm-dev libegl-dev libevdev-dev libgbm-dev
|
||||
libgudev-1.0-dev libopengl-dev libpcap-dev libssl-dev libudev-dev
|
||||
- wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
|
||||
- chmod +x /tmp/llvm.sh
|
||||
- /tmp/llvm.sh 17
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get -y install lld-17
|
||||
- ./.github/workflows/scripts/linux/build-dependencies-runner.sh "$CI_PROJECT_DIR/.deps"
|
||||
|
||||
# Inclusion templates, required for the build to work
|
||||
include:
|
||||
# Linux
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/linux-cmake.yml'
|
||||
|
||||
# Stages for building
|
||||
stages:
|
||||
- build-prepare
|
||||
- build-shared
|
||||
|
||||
##############################################################################
|
||||
#################################### STAGES ##################################
|
||||
##############################################################################
|
||||
#
|
||||
################################### DESKTOPS #################################
|
||||
# Linux 64-bit
|
||||
libretro-build-linux-x64:
|
||||
extends:
|
||||
- .libretro-linux-cmake-x86_64
|
||||
- .core-defs-linux
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports
|
||||
|
||||
# Linux 64-bit (ARM)
|
||||
libretro-build-linux-aarch64:
|
||||
extends:
|
||||
- .libretro-linux-cmake-aarch64
|
||||
- .core-defs-linux
|
||||
@@ -40,3 +40,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set_target_properties(pcsx2-libretro PROPERTIES
|
||||
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/link.T")
|
||||
endif()
|
||||
|
||||
# The libretro buildbot's ci-templates build the target named
|
||||
# <CORENAME>_libretro (see .gitlab-ci.yml).
|
||||
add_custom_target(yaps2_libretro)
|
||||
add_dependencies(yaps2_libretro pcsx2-libretro)
|
||||
|
||||
Reference in New Issue
Block a user