mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-31 23:03:33 +00:00
ci: Migrate to CachyOS and optimize build configuration
- Switch from Ubuntu 20.04 to cachyos/cachyos:latest for better performance - Replace apt package manager with pacman for CachyOS compatibility - Remove Windows build job (not needed) - Remove ARM64 cross-compilation build (not needed) - Implement custom CMake configuration with: * Ninja build system (-GNinja) * Core2 CPU optimization (-march=core2 -mtune=core2) * LTO enabled (CITRON_ENABLE_LTO=ON) * Bundled vcpkg (CITRON_USE_BUNDLED_VCPKG=ON) * Tests disabled (CITRON_TESTS=OFF) * Discord presence disabled (USE_DISCORD_PRESENCE=OFF) * Speex bundling enabled (BUNDLE_SPEEX=ON) * Warning suppression (-Wno-error) - Update package dependencies to use CachyOS package names - Streamline CI pipeline to focus on single optimized Linux build
This commit is contained in:
@@ -18,70 +18,34 @@ cache:
|
||||
key: "$CI_COMMIT_REF_SLUG"
|
||||
policy: pull-push
|
||||
|
||||
# Windows Build (disabled - no Windows runner available)
|
||||
build-windows:
|
||||
stage: build
|
||||
image: mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
tags:
|
||||
- citron-build
|
||||
- linux
|
||||
- ubuntu
|
||||
before_script:
|
||||
- choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||
- choco install git -y
|
||||
- choco install visualstudio2022buildtools -y
|
||||
- choco install visualstudio2022-workload-vctools -y
|
||||
script:
|
||||
- git submodule update --init --recursive
|
||||
- cmake -B build -S . -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCITRON_USE_BUNDLED_VCPKG=ON -DENABLE_QT=ON -DENABLE_SDL2=ON -DENABLE_WEB_SERVICE=ON -DCITRON_USE_BUNDLED_QT=ON -DCITRON_USE_BUNDLED_SDL2=ON -DCITRON_USE_BUNDLED_FFMPEG=ON
|
||||
- cmake --build build --config %BUILD_TYPE% --parallel
|
||||
artifacts:
|
||||
paths:
|
||||
- build/bin/*.exe
|
||||
- build/bin/*.dll
|
||||
expire_in: 1 week
|
||||
only:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
- ci-fixes
|
||||
- merge_requests
|
||||
allow_failure: true # Allow failure if Windows runner not available
|
||||
|
||||
# Linux Build (Ubuntu 24.04 optimized)
|
||||
# Linux Build (CachyOS optimized)
|
||||
build-linux:
|
||||
stage: build
|
||||
image: ubuntu:20.04
|
||||
image: cachyos/cachyos:latest
|
||||
tags:
|
||||
- linux
|
||||
- ubuntu
|
||||
before_script:
|
||||
- apt-get update -qq
|
||||
- apt-get install -y -qq build-essential cmake ninja-build pkg-config git curl wget unzip
|
||||
- apt-get install -y -qq libgl1-mesa-dev libglu1-mesa-dev
|
||||
- apt-get install -y -qq libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev
|
||||
- apt-get install -y -qq libxcb-render-util0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev
|
||||
- apt-get install -y -qq libxcb-xfixes0-dev libxcb-xinerama0-dev
|
||||
- apt-get install -y -qq libxcb1-dev libxkbcommon-x11-dev libxkbcommon-dev
|
||||
- apt-get install -y -qq libxcb-util0-dev libxcb-xkb-dev
|
||||
- apt-get install -y -qq libpulse-dev libasound2-dev libusb-1.0-0-dev
|
||||
- apt-get install -y -qq libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev
|
||||
- apt-get install -y -qq libssl-dev libboost-all-dev libboost-context-dev
|
||||
- apt-get install -y -qq libstb-dev libopus-dev libenet-dev libsimpleini-dev
|
||||
- apt-get install -y -qq libvulkan-dev
|
||||
- apt-get install -y -qq qtbase5-dev qtbase5-private-dev qtmultimedia5-dev
|
||||
- apt-get install -y -qq libqt5core5a libqt5gui5 libqt5widgets5 libqt5dbus5
|
||||
- apt-get install -y -qq qt5-image-formats-plugins qt5-gtk-platformtheme
|
||||
- apt-get install -y -qq libicu66
|
||||
- apt-get install -y -qq mesa-common-dev libdrm-dev
|
||||
- apt-get install -y -qq nasm
|
||||
- apt-get install -y -qq glslang-tools
|
||||
- apt-get install -y -qq libmbedtls-dev catch2
|
||||
- apt-get install -y -qq libfuse2 gdb
|
||||
- pacman -Syu --noconfirm
|
||||
- pacman -S --noconfirm base-devel cmake ninja pkg-config git curl wget unzip
|
||||
- pacman -S --noconfirm mesa glu
|
||||
- pacman -S --noconfirm libxcb xcb-util xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil
|
||||
- pacman -S --noconfirm libxkbcommon libxkbcommon-x11
|
||||
- pacman -S --noconfirm pulseaudio alsa-lib libusb
|
||||
- pacman -S --noconfirm ffmpeg
|
||||
- pacman -S --noconfirm openssl boost
|
||||
- pacman -S --noconfirm vulkan-headers vulkan-icd-loader
|
||||
- pacman -S --noconfirm qt5-base qt5-multimedia qt5-imageformats
|
||||
- pacman -S --noconfirm nasm
|
||||
- pacman -S --noconfirm glslang
|
||||
- pacman -S --noconfirm fuse2 gdb
|
||||
script:
|
||||
- git submodule update --init --recursive
|
||||
- cmake -B build -S . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_QT=ON -DENABLE_SDL2=ON -DENABLE_WEB_SERVICE=ON -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_FLAGS="-Wno-error=conversion" -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++"
|
||||
- cmake --build build --config $BUILD_TYPE --parallel $CMAKE_BUILD_PARALLEL_LEVEL
|
||||
- mkdir -p build && cd build
|
||||
- cmake .. -GNinja -DCITRON_ENABLE_LTO=ON -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_TESTS=OFF -DCITRON_USE_LLVM_DEMANGLE=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS="-march=core2 -mtune=core2 -Wno-error" -DCMAKE_C_FLAGS="-march=core2 -mtune=core2" -DUSE_DISCORD_PRESENCE=OFF -DBUNDLE_SPEEX=ON -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
- ninja
|
||||
- cd ..
|
||||
- echo "Build completed, checking for executables..."
|
||||
- ls -la build/bin/ || echo "No build/bin directory found"
|
||||
- find build/ -name "*.so" -o -name "citron*" | head -20 || echo "No shared libraries or executables found"
|
||||
@@ -106,30 +70,6 @@ build-linux:
|
||||
- ci-fixes
|
||||
- merge_requests
|
||||
|
||||
# Cross-compilation for ARM64
|
||||
build-linux-aarch64:
|
||||
stage: build
|
||||
image: ubuntu:24.04
|
||||
tags:
|
||||
- linux
|
||||
- ubuntu
|
||||
before_script:
|
||||
- apt-get update -qq
|
||||
- apt-get install -y -qq build-essential cmake git gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
||||
- apt-get install -y -qq libboost-all-dev libboost-context-dev
|
||||
script:
|
||||
- git submodule update --init --recursive
|
||||
- cmake -B build-cross -S . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DCMAKE_CXX_FLAGS="-Wno-error=conversion"
|
||||
- cmake --build build-cross --config $BUILD_TYPE --parallel $CMAKE_BUILD_PARALLEL_LEVEL
|
||||
artifacts:
|
||||
paths:
|
||||
- build-cross/bin/citron
|
||||
expire_in: 1 week
|
||||
only:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
- ci-fixes
|
||||
|
||||
# Android Build (Ubuntu 24.04 optimized)
|
||||
build-android:
|
||||
@@ -209,7 +149,6 @@ package-release:
|
||||
- ubuntu
|
||||
dependencies:
|
||||
- build-linux
|
||||
- build-linux-aarch64
|
||||
script:
|
||||
- mkdir -p release
|
||||
- echo "Creating release package..."
|
||||
|
||||
Reference in New Issue
Block a user