ci: improvements

This commit is contained in:
itsmattkc committed 2025-02-18 13:56:39 -08:00
1 parent cd96b9aad9
commit fca7e2f0f4
7 files changed
+119 -46

No files matched your search

+2 -2
View File
@@ -39,11 +39,11 @@ jobs:
- name: Build Docker image
run: |
cd docker/${{ matrix.platform.os }}
docker build --platform linux/${{ matrix.platform.arch }} -t vanilla-${{ matrix.platform.os }}-${{ matrix.platform.arch }} .
docker build --build-arg ARCH=${{ matrix.platform.arch }} -t vanilla-${{ matrix.platform.os }}-${{ matrix.platform.arch }} .
- name: Run Docker container
run: |
docker run --platform linux/${{ matrix.platform.arch }} -v "${{ github.workspace }}:/vanilla" -v "${{ github.workspace }}/build:/install" vanilla-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
docker run -v "${{ github.workspace }}:/vanilla" -v "${{ github.workspace }}/build:/install" vanilla-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Archive
run: |
+40
View File
@@ -0,0 +1,40 @@
#.rst:
# FindDRM
# -------
#
# Find DRM library
#
# Try to find DRM library on UNIX systems. The following values are defined
#
# ::
#
# DRM_FOUND - True if drm is available
# DRM_INCLUDE_DIRS - Include directories for drm
# DRM_LIBRARIES - List of libraries for drm
# DRM_DEFINITIONS - List of definitions for drm
#
#=============================================================================
# Copyright (c) 2015 Jari Vetoniemi
#
# Distributed under the OSI-approved BSD License (the "License");
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
include(FeatureSummary)
set_package_properties(DRM PROPERTIES
URL "http://dri.freedesktop.org/"
DESCRIPTION "Kernel module that gives direct hardware access to DRI clients")
find_package(PkgConfig)
pkg_check_modules(PC_DRM QUIET libdrm)
find_library(DRM_LIBRARIES NAMES drm HINTS ${PC_DRM_LIBRARY_DIRS})
find_path(DRM_INCLUDE_DIRS NAMES drm.h PATH_SUFFIXES libdrm drm HINTS ${PC_DRM_INCLUDE_DIRS})
set(DRM_DEFINITIONS ${PC_DRM_CFLAGS_OTHER})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DRM DEFAULT_MSG DRM_INCLUDE_DIRS DRM_LIBRARIES)
mark_as_advanced(DRM_INCLUDE_DIRS DRM_LIBRARIES DRM_DEFINITIONS)
+1 -2
View File
@@ -26,6 +26,5 @@ RUN yes Y | /opt/android/cmdline-tools/tools/bin/sdkmanager --licenses
ENV ANDROID_HOME=/opt/android
ENV ANDROID_NDK_HOME=/opt/android/ndk/${ANDROID_NDK}
ENV PATH="$PATH:/opt/gradlew:$ANDROID_HOME/cmdline-tools/tools/bin:/opt/android/platform-tools:$ANDROID_NDK_HOME:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-${SYSTEM_ARCH}/bin"
COPY "build.sh" "/"
CMD [ "/build.sh" ]
ENTRYPOINT [ "/vanilla/docker/android/build.sh" ]
+42 -21
View File
@@ -1,28 +1,49 @@
FROM almalinux:8
FROM debian:bookworm
# RUN apt -y update
# RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install build-essential ninja-build libnl-genl-3-dev libssl-dev nasm git wget pkg-config
RUN dnf -y update
RUN dnf -y install 'dnf-command(config-manager)'
RUN dnf -y config-manager --set-enabled powertools
RUN dnf -y install gcc-toolset-14
RUN dnf -y install wget
RUN dnf -y install git
RUN dnf -y install nasm
RUN dnf -y install libnl3-devel
RUN dnf -y install openssl-devel
RUN dnf -y install pulseaudio-libs-devel
RUN dnf -y install alsa-lib-devel
RUN dnf -y install libX11-devel
RUN dnf -y install libXext-devel
RUN dnf -y install wayland-devel
RUN dnf -y install libdrm-devel
ARG ARCH=amd64
ENV ARCH=${ARCH}
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN if [ "${ARCH}" = "aarch64" ]; then export DEBARCH="arm64"; export DEBGCC="gcc-aarch64-linux-gnu"; \
elif [ "${ARCH}" = "x86_64" ]; then export DEBARCH="amd64"; export DEBGCC="gcc"; \
else export DEBARCH="${ARCH}"; fi \
&& dpkg --add-architecture $DEBARCH \
&& apt -y update \
&& apt -y install $DEBGCC ninja-build nasm git wget pkg-config make \
&& apt -y install libnl-genl-3-dev:$DEBARCH \
&& apt -y install libssl-dev:$DEBARCH \
&& apt -y install libpulse-dev:$DEBARCH \
&& apt -y install libasound2-dev:$DEBARCH \
&& apt -y install libx11-dev:$DEBARCH \
&& apt -y install libdrm-dev:$DEBARCH \
&& apt -y install libwayland-dev:$DEBARCH \
&& apt -y install libxext-dev:$DEBARCH \
&& apt -y install libnl-route-3-dev:$DEBARCH \
&& apt -y install libxcb-xinput-dev:$DEBARCH
# RUN apt -y install libpipewire-dev:$DEBARCH
# RUN dnf -y update
# RUN dnf -y install 'dnf-command(config-manager)'
# RUN dnf -y config-manager --set-enabled powertools
# RUN dnf -y install gcc-toolset-14
# RUN dnf -y install wget
# RUN dnf -y install git
# RUN dnf -y install nasm
# RUN dnf -y install libnl3-devel
# RUN dnf -y install openssl-devel
# RUN dnf -y install pulseaudio-libs-devel
# RUN dnf -y install alsa-lib-devel
# RUN dnf -y install libX11-devel
# RUN dnf -y install libXext-devel
# RUN dnf -y install wayland-devel
# RUN dnf -y install libdrm-devel
# Install newer version of CMake
ENV CMAKE_VER=3.31.5
RUN wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VER/cmake-$CMAKE_VER-linux-$(uname -m).sh \
&& chmod +x cmake-$CMAKE_VER-linux-$(uname -m).sh \
&& ./cmake-$CMAKE_VER-linux-$(uname -m).sh --prefix=/usr --skip-license
COPY "build.sh" "/"
CMD [ "/build.sh" ]
ENTRYPOINT [ "/vanilla/docker/linux/build.sh" ]
+13 -2
View File
@@ -1,6 +1,17 @@
#!/bin/sh
source /opt/rh/gcc-toolset-14/enable
EXTRA_CMAKE_FLAGS=
if [ "$ARCH" = "aarch64" ]
then
EXTRA_CMAKE_FLAGS="-DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_CROSS_PREFIX=aarch64-linux-gnu-"
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
export PATH=$PATH:/usr/lib/aarch64-linux-gnu
export CC=aarch64-linux-gnu-gcc
export AR=aarch64-linux-gnu-ar
fi
mkdir -p /build
cmake -S /vanilla -B /build -DVANILLA_BUILD_VENDORED=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake -S /vanilla -B /build -DVANILLA_BUILD_VENDORED=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo $EXTRA_CMAKE_FLAGS
cmake --build /build --parallel
cmake --install /build --prefix "/install"
+5 -5
View File
@@ -3,12 +3,12 @@ FROM ubuntu:24.04
RUN apt -y update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install gcc-mingw-w64 git wget make nasm
# Install newer version of CMake
ENV CMAKE_VER=3.31.5
RUN wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VER/cmake-$CMAKE_VER-linux-x86_64.sh \
&& chmod +x cmake-$CMAKE_VER-linux-x86_64.sh \
&& ./cmake-$CMAKE_VER-linux-x86_64.sh --prefix=/usr --skip-license
RUN wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VER/cmake-$CMAKE_VER-linux-$(uname -m).sh \
&& chmod +x cmake-$CMAKE_VER-linux-$(uname -m).sh \
&& ./cmake-$CMAKE_VER-linux-$(uname -m).sh --prefix=/usr --skip-license
COPY "build.sh" "/"
COPY "mingw-w64-x86_64.cmake" "/"
CMD [ "/build.sh" ]
ENTRYPOINT [ "/vanilla/docker/windows/build.sh" ]
+16 -14
View File
@@ -104,11 +104,15 @@ if (VANILLA_BUILD_VENDORED)
--strip=${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-${CMAKE_HOST_SYSTEM_PROCESSOR}/bin/llvm-strip
)
list(APPEND FFMPEG_ENV "PATH=$ENV{PATH}:${CMAKE_ANDROID_NDK}/toolchains/llvm/prebuilt/linux-${CMAKE_HOST_SYSTEM_PROCESSOR}/bin")
elseif(LINUX)
set(FFMPEG_TARGET_OS "linux")
endif()
list(APPEND FFMPEG_CONFIGURE_ARGS
--enable-cross-compile
--arch=${CMAKE_SYSTEM_PROCESSOR}
--target-os=${FFMPEG_TARGET_OS}
--cross-prefix=${CMAKE_CROSS_PREFIX}
--host-cc=${CMAKE_C_COMPILER}
)
endif()
@@ -200,20 +204,6 @@ target_link_libraries(vanilla-pi PRIVATE
m
)
if (LINUX)
# Assume this platform is capable of running vanilla-pipe
target_compile_definitions(vanilla-pi PRIVATE VANILLA_PIPE_AVAILABLE)
target_link_libraries(vanilla-pi PRIVATE
drm
)
target_include_directories(vanilla-pi PRIVATE
# xf86drm.h needs this
/usr/include/libdrm
)
endif()
if (ANDROID)
target_link_libraries(vanilla-pi PRIVATE
SDL2main
@@ -234,6 +224,18 @@ target_link_libraries(vanilla-pi PRIVATE
${_vanilla_pi_libs}
)
if (LINUX)
# Assume this platform is capable of running vanilla-pipe
target_compile_definitions(vanilla-pi PRIVATE VANILLA_PIPE_AVAILABLE)
# Link with DRM if available
find_package(DRM)
if (DRM_FOUND)
target_link_libraries(vanilla-pi PRIVATE ${DRM_LIBRARIES})
target_include_directories(vanilla-pi PRIVATE ${DRM_INCLUDE_DIRS})
endif()
endif()
# Find libxml2 (used for storing/parsing user config)
if (NOT VANILLA_BUILD_VENDORED)
find_package(libxml2 REQUIRED)