mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 14:38:29 +00:00
ci+n3ds: avoid apt-get package manager
- use Unix Makefiles (with parallelization) CMake generator - use binutils strings binary from devkitpro
This commit is contained in:
11
.github/workflows/create-test-plan.py
vendored
11
.github/workflows/create-test-plan.py
vendored
@@ -177,6 +177,7 @@ class JobDetails:
|
|||||||
brew_packages: list[str] = dataclasses.field(default_factory=list)
|
brew_packages: list[str] = dataclasses.field(default_factory=list)
|
||||||
cmake_toolchain_file: str = ""
|
cmake_toolchain_file: str = ""
|
||||||
cmake_arguments: list[str] = dataclasses.field(default_factory=list)
|
cmake_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||||
|
cmake_generator: str = "Ninja"
|
||||||
cmake_build_arguments: list[str] = dataclasses.field(default_factory=list)
|
cmake_build_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||||
clang_tidy: bool = True
|
clang_tidy: bool = True
|
||||||
cppflags: list[str] = dataclasses.field(default_factory=list)
|
cppflags: list[str] = dataclasses.field(default_factory=list)
|
||||||
@@ -226,6 +227,7 @@ class JobDetails:
|
|||||||
setup_python: bool = False
|
setup_python: bool = False
|
||||||
pypi_packages: list[str] = dataclasses.field(default_factory=list)
|
pypi_packages: list[str] = dataclasses.field(default_factory=list)
|
||||||
setup_gage_sdk_path: str = ""
|
setup_gage_sdk_path: str = ""
|
||||||
|
binutils_strings: str = "strings"
|
||||||
|
|
||||||
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
|
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
|
||||||
data = {
|
data = {
|
||||||
@@ -259,6 +261,7 @@ class JobDetails:
|
|||||||
"cflags": my_shlex_join(self.cppflags + self.cflags),
|
"cflags": my_shlex_join(self.cppflags + self.cflags),
|
||||||
"cxxflags": my_shlex_join(self.cppflags + self.cxxflags),
|
"cxxflags": my_shlex_join(self.cppflags + self.cxxflags),
|
||||||
"ldflags": my_shlex_join(self.ldflags),
|
"ldflags": my_shlex_join(self.ldflags),
|
||||||
|
"cmake-generator": self.cmake_generator,
|
||||||
"cmake-toolchain-file": self.cmake_toolchain_file,
|
"cmake-toolchain-file": self.cmake_toolchain_file,
|
||||||
"clang-tidy": self.clang_tidy,
|
"clang-tidy": self.clang_tidy,
|
||||||
"cmake-arguments": my_shlex_join(self.cmake_arguments),
|
"cmake-arguments": my_shlex_join(self.cmake_arguments),
|
||||||
@@ -294,6 +297,7 @@ class JobDetails:
|
|||||||
"setup-python": self.setup_python,
|
"setup-python": self.setup_python,
|
||||||
"pypi-packages": my_shlex_join(self.pypi_packages),
|
"pypi-packages": my_shlex_join(self.pypi_packages),
|
||||||
"setup-ngage-sdk-path": self.setup_gage_sdk_path,
|
"setup-ngage-sdk-path": self.setup_gage_sdk_path,
|
||||||
|
"binutils-strings": self.binutils_strings,
|
||||||
}
|
}
|
||||||
return {k: v for k, v in data.items() if v != ""}
|
return {k: v for k, v in data.items() if v != ""}
|
||||||
|
|
||||||
@@ -682,13 +686,16 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
|||||||
job.shared_lib = SharedLibType.SO_0
|
job.shared_lib = SharedLibType.SO_0
|
||||||
job.static_lib = StaticLibType.A
|
job.static_lib = StaticLibType.A
|
||||||
case SdlPlatform.N3ds:
|
case SdlPlatform.N3ds:
|
||||||
job.ccache = True
|
job.cmake_generator = "Unix Makefiles"
|
||||||
|
job.cmake_build_arguments.append("-j$(nproc)")
|
||||||
|
job.ccache = False
|
||||||
job.shared = False
|
job.shared = False
|
||||||
job.apt_packages = ["ccache", "ninja-build", "binutils"]
|
job.apt_packages = []
|
||||||
job.clang_tidy = False
|
job.clang_tidy = False
|
||||||
job.run_tests = False
|
job.run_tests = False
|
||||||
job.cc_from_cmake = True
|
job.cc_from_cmake = True
|
||||||
job.cmake_toolchain_file = "${DEVKITPRO}/cmake/3DS.cmake"
|
job.cmake_toolchain_file = "${DEVKITPRO}/cmake/3DS.cmake"
|
||||||
|
job.binutils_strings = "/opt/devkitpro/devkitARM/bin/arm-none-eabi-strings"
|
||||||
job.static_lib = StaticLibType.A
|
job.static_lib = StaticLibType.A
|
||||||
case SdlPlatform.Msys2:
|
case SdlPlatform.Msys2:
|
||||||
job.ccache = True
|
job.ccache = True
|
||||||
|
6
.github/workflows/generic.yml
vendored
6
.github/workflows/generic.yml
vendored
@@ -206,7 +206,7 @@ jobs:
|
|||||||
#shell: ${{ matrix.platform.shell }}
|
#shell: ${{ matrix.platform.shell }}
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.platform.source-cmd }}
|
${{ matrix.platform.source-cmd }}
|
||||||
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -GNinja \
|
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -G "${{ matrix.platform.cmake-generator }}" \
|
||||||
-Wdeprecated -Wdev -Werror \
|
-Wdeprecated -Wdev -Werror \
|
||||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||||
@@ -237,9 +237,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "This should show us the SDL_REVISION"
|
echo "This should show us the SDL_REVISION"
|
||||||
echo "Shared library:"
|
echo "Shared library:"
|
||||||
${{ (matrix.platform.shared-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
|
${{ (matrix.platform.shared-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
|
||||||
echo "Static library:"
|
echo "Static library:"
|
||||||
${{ (matrix.platform.static-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
|
${{ (matrix.platform.static-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
|
||||||
- name: 'Run build-time tests (CMake)'
|
- name: 'Run build-time tests (CMake)'
|
||||||
id: tests
|
id: tests
|
||||||
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
|
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
|
||||||
|
Reference in New Issue
Block a user