Skip to content

Commit e6d200e

Browse files
committed
ci+n3ds: avoid apt-get package manager
- use Unix Makefiles (with parallelization) CMake generator - use binutils strings binary from devkitpro
1 parent 72b7fd1 commit e6d200e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/create-test-plan.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class JobDetails:
177177
brew_packages: list[str] = dataclasses.field(default_factory=list)
178178
cmake_toolchain_file: str = ""
179179
cmake_arguments: list[str] = dataclasses.field(default_factory=list)
180+
cmake_generator: str = "Ninja"
180181
cmake_build_arguments: list[str] = dataclasses.field(default_factory=list)
181182
clang_tidy: bool = True
182183
cppflags: list[str] = dataclasses.field(default_factory=list)
@@ -226,6 +227,7 @@ class JobDetails:
226227
setup_python: bool = False
227228
pypi_packages: list[str] = dataclasses.field(default_factory=list)
228229
setup_gage_sdk_path: str = ""
230+
binutils_strings: str = "strings"
229231

230232
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
231233
data = {
@@ -259,6 +261,7 @@ def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
259261
"cflags": my_shlex_join(self.cppflags + self.cflags),
260262
"cxxflags": my_shlex_join(self.cppflags + self.cxxflags),
261263
"ldflags": my_shlex_join(self.ldflags),
264+
"cmake-generator": self.cmake_generator,
262265
"cmake-toolchain-file": self.cmake_toolchain_file,
263266
"clang-tidy": self.clang_tidy,
264267
"cmake-arguments": my_shlex_join(self.cmake_arguments),
@@ -294,6 +297,7 @@ def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
294297
"setup-python": self.setup_python,
295298
"pypi-packages": my_shlex_join(self.pypi_packages),
296299
"setup-ngage-sdk-path": self.setup_gage_sdk_path,
300+
"binutils-strings": self.binutils_strings,
297301
}
298302
return {k: v for k, v in data.items() if v != ""}
299303

@@ -682,13 +686,16 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
682686
job.shared_lib = SharedLibType.SO_0
683687
job.static_lib = StaticLibType.A
684688
case SdlPlatform.N3ds:
685-
job.ccache = True
689+
job.cmake_generator = "Unix Makefiles"
690+
job.cmake_build_arguments.append("-j$(nproc)")
691+
job.ccache = False
686692
job.shared = False
687-
job.apt_packages = ["ccache", "ninja-build", "binutils"]
693+
job.apt_packages = []
688694
job.clang_tidy = False
689695
job.run_tests = False
690696
job.cc_from_cmake = True
691697
job.cmake_toolchain_file = "${DEVKITPRO}/cmake/3DS.cmake"
698+
job.binutils_strings = "/opt/devkitpro/devkitARM/bin/arm-none-eabi-strings"
692699
job.static_lib = StaticLibType.A
693700
case SdlPlatform.Msys2:
694701
job.ccache = True

.github/workflows/generic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
#shell: ${{ matrix.platform.shell }}
207207
run: |
208208
${{ matrix.platform.source-cmd }}
209-
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -GNinja \
209+
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -G "${{ matrix.platform.cmake-generator }}" \
210210
-Wdeprecated -Wdev -Werror \
211211
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
212212
-DSDL_WERROR=${{ matrix.platform.werror }} \
@@ -237,9 +237,9 @@ jobs:
237237
run: |
238238
echo "This should show us the SDL_REVISION"
239239
echo "Shared library:"
240-
${{ (matrix.platform.shared-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
240+
${{ (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>"' }}
241241
echo "Static library:"
242-
${{ (matrix.platform.static-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
242+
${{ (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>"' }}
243243
- name: 'Run build-time tests (CMake)'
244244
id: tests
245245
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}

0 commit comments

Comments
 (0)