mirror of
https://github.com/libretro/parallel-gx2.git
synced 2026-11-07 04:25:58 -10:00
This repository builds the libretro core; the standalone wx application was built from it only by upstream's workflows. Gone: src/gui/wxgui, the CemuBin target with its macOS bundle and Windows resources, the wx/GTK and SDL vcpkg features, dist/linux and dist/windows, the GUI's translations in bin/resources (the Wii U shared fonts there stay - the core loads them), src/tools, CMakeSettings.json, and the Build Cemu, Build check, Deploy release, Calculate Next Version and Generate translation template workflows. ENABLE_LIBRETRO is now always on; it stays a variable because the rest of the build, shared with upstream, still asks for it. At the next upstream sync, a modify/delete conflict on any of these is resolved by keeping the file deleted. Built on all seven targets plus iOS and tvOS.
247 lines
8.2 KiB
YAML
247 lines
8.2 KiB
YAML
name: Build libretro core
|
|
|
|
# Builds cemu_libretro for every target the core currently supports and uploads
|
|
# each result as an artifact, so a release can be assembled from them.
|
|
#
|
|
# The Android jobs mirror .gitlab-ci.yml, whose android-cmake template has
|
|
# nowhere to run (this core is not on git.libretro.com).
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- libretro
|
|
paths-ignore:
|
|
- '**.md'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
VCPKG_ROOT: "${{github.workspace}}/dependencies/vcpkg"
|
|
|
|
jobs:
|
|
linux:
|
|
name: linux-${{ matrix.arch }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 350
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-22.04
|
|
arch: x64
|
|
- os: ubuntu-22.04-arm
|
|
arch: arm64
|
|
|
|
steps:
|
|
- name: "Checkout repo"
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: "Install dependencies"
|
|
run: |
|
|
sudo apt update -qq
|
|
sudo apt install -y --no-install-recommends \
|
|
cmake ninja-build nasm autoconf automake libtool pkg-config python3 \
|
|
libglm-dev libgl1-mesa-dev libegl1-mesa-dev freeglut3-dev \
|
|
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 libpulse-dev \
|
|
libsecret-1-dev libsystemd-dev libbluetooth-dev
|
|
|
|
- name: "Bootstrap vcpkg"
|
|
run: bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
|
|
|
- name: "Configure"
|
|
# Flags as documented in README.md, plus the two the GitLab job turns
|
|
# off because the core does not use them.
|
|
run: |
|
|
cmake -S . -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DENABLE_LIBRETRO=ON \
|
|
-DENABLE_WXWIDGETS=OFF \
|
|
-DENABLE_DISCORD_RPC=OFF \
|
|
-DENABLE_CUBEB=OFF \
|
|
-DENABLE_BLUEZ=OFF \
|
|
-DENABLE_FERAL_GAMEMODE=OFF \
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
|
|
- name: "Build"
|
|
run: cmake --build build --target cemu_libretro -- -j $(nproc)
|
|
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: cemu_libretro-linux-${{ matrix.arch }}
|
|
path: ./bin/cemu_libretro.so
|
|
|
|
macos:
|
|
name: macos-${{ matrix.arch }}
|
|
runs-on: macos-14
|
|
# First macOS build of the core: src/CMakeLists.txt already keeps the X11/GL
|
|
# link line to `UNIX AND NOT APPLE` and defines VK_USE_PLATFORM_MACOS_MVK,
|
|
# but nothing here has ever been through a compiler. Same treatment as the
|
|
# Windows job until it has.
|
|
continue-on-error: true
|
|
timeout-minutes: 350
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [arm64, x86_64]
|
|
|
|
steps:
|
|
- name: "Checkout repo"
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: "Install dependencies"
|
|
run: brew install nasm automake libtool
|
|
|
|
- name: "Install molten-vk"
|
|
# The Vulkan renderer links against the loader; on macOS that is
|
|
# MoltenVK, the release upstream's macOS build uses.
|
|
run: |
|
|
curl -L -O https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-macos-privateapi.tar
|
|
tar xf MoltenVK-macos-privateapi.tar
|
|
sudo mkdir -p /usr/local/lib
|
|
sudo cp MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib /usr/local/lib
|
|
|
|
- name: "Setup cmake"
|
|
uses: jwlawson/actions-setup-cmake@v2
|
|
with:
|
|
cmake-version: '3.29.0'
|
|
|
|
- name: "Bootstrap vcpkg"
|
|
run: bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
|
|
|
- name: "Configure"
|
|
# Same flags as the Linux job; BLUEZ and FERAL_GAMEMODE are Linux-only
|
|
# options that are already off here, and the architecture is passed the
|
|
# way the standalone macOS build passes it, so vcpkg picks the matching
|
|
# triplet for the x86_64 slice on this arm64 runner.
|
|
run: |
|
|
cmake -S . -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
|
|
-DENABLE_LIBRETRO=ON \
|
|
-DENABLE_WXWIDGETS=OFF \
|
|
-DENABLE_DISCORD_RPC=OFF \
|
|
-DENABLE_CUBEB=OFF \
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
|
|
- name: "Build"
|
|
run: cmake --build build --target cemu_libretro -- -j $(sysctl -n hw.ncpu)
|
|
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: cemu_libretro-macos-${{ matrix.arch }}
|
|
path: ./bin/cemu_libretro.dylib
|
|
|
|
windows:
|
|
name: windows-x64
|
|
runs-on: windows-2022
|
|
# The WGL path in the glue layer has never been through a compiler; give it
|
|
# a run without failing the whole workflow over it.
|
|
continue-on-error: true
|
|
timeout-minutes: 350
|
|
|
|
steps:
|
|
- name: "Checkout repo"
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: "Setup cmake"
|
|
uses: jwlawson/actions-setup-cmake@v2
|
|
with:
|
|
cmake-version: '3.29.0'
|
|
|
|
- name: "Bootstrap vcpkg"
|
|
run: ./dependencies/vcpkg/bootstrap-vcpkg.bat
|
|
|
|
- name: "Configure"
|
|
# RelWithDebInfo instead of Release: same optimization level for MSVC,
|
|
# but keeps a PDB around so a crash dump/live debug session resolves to
|
|
# real function names instead of the nearest export + a huge offset.
|
|
run: |
|
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_LIBRETRO=ON -DENABLE_WXWIDGETS=OFF -DENABLE_DISCORD_RPC=OFF -DENABLE_CUBEB=OFF -DVCPKG_INSTALL_OPTIONS="--clean-after-build"
|
|
|
|
- name: "Build"
|
|
run: cmake --build build --target cemu_libretro --config RelWithDebInfo
|
|
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: cemu_libretro-windows-x64
|
|
path: |
|
|
./bin/cemu_libretro.dll
|
|
./bin/cemu_libretro.pdb
|
|
|
|
android:
|
|
name: android-${{ matrix.abi }}
|
|
runs-on: ubuntu-22.04
|
|
# This target has never been built: the whole vcpkg set has to come up for a
|
|
# cross triplet first, so do not fail the run over it.
|
|
continue-on-error: true
|
|
timeout-minutes: 350
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- abi: arm64-v8a
|
|
triplet: arm64-android
|
|
- abi: x86_64
|
|
triplet: x64-android
|
|
|
|
steps:
|
|
- name: "Checkout repo"
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: "Install host dependencies"
|
|
run: |
|
|
sudo apt update -qq
|
|
sudo apt install -y --no-install-recommends \
|
|
nasm autoconf automake libtool pkg-config python3 ninja-build
|
|
|
|
- name: "Bootstrap vcpkg"
|
|
run: bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
|
|
|
- name: "Configure"
|
|
# API level 28, as in the GitLab job: bionic gained iconv (which SDL2
|
|
# links against) and aligned_alloc there, and the template's default of
|
|
# 16 is useless for C++20 anyway. CMAKE_TOOLCHAIN_FILE is the NDK's -
|
|
# the top-level CMakeLists turns it into a vcpkg chainload toolchain.
|
|
run: |
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DENABLE_LIBRETRO=ON \
|
|
-DENABLE_BLUEZ=OFF \
|
|
-DENABLE_FERAL_GAMEMODE=OFF \
|
|
-DENABLE_WAYLAND=OFF \
|
|
-DENABLE_DISCORD_RPC=OFF \
|
|
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
|
|
-DVCPKG_HOST_TRIPLET=x64-linux \
|
|
-DANDROID_PLATFORM=android-28 \
|
|
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake \
|
|
-DANDROID_STL=c++_static \
|
|
-DANDROID_ABI=${{ matrix.abi }} \
|
|
. -Bbuild/android-${{ matrix.abi }}
|
|
|
|
- name: "Build"
|
|
run: cmake --build build/android-${{ matrix.abi }} --target cemu_libretro --config Release -- -j $(nproc)
|
|
|
|
- name: "Prepare artifact"
|
|
run: mv bin/cemu_libretro.so cemu_libretro_android.so
|
|
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: cemu_libretro-android-${{ matrix.abi }}
|
|
path: ./cemu_libretro_android.so
|