From 00abbaea211f9a94fb9ce27a3746af81a2e14b86 Mon Sep 17 00:00:00 2001 From: Nathan Glenn Date: Fri, 17 May 2024 18:26:07 -0500 Subject: [PATCH] Update Ubuntu runner image to get later SWIG We need version 4.2.0 to build ABI3 Python bindings. Ubuntu has max version numbers for packages tied to the Ubuntu version, so upgrading Ubuntu is probably the easiest fix here. The GH runner readme says it has SWIG 4.2.0: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md Improve the SWIG version error by printing the required and found SWIG versions. --- .github/workflows/build.yml | 5 +++-- Core/ClientSMLSWIG/Python/SConscript | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44239bf250..f4d6b39371 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ # Build, test and upload executables to GitHub # depends on pre-installed software; see image definitions: -# - https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md +# - https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2404-Readme.md # - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md # We use these tools from the runner images: git, gcc/XCode/MSVC, swig, Tcl/Tk on MacOS, pkg-config @@ -28,7 +28,8 @@ jobs: fail-fast: false matrix: os: [ - ubuntu-latest, + # Use v24 beta for now to get newer SWIG; TODO: change back to ubuntu-latest once it points to v24 + ubuntu-24.04, # latest available X86_64 target macos-12, # latest is ARM diff --git a/Core/ClientSMLSWIG/Python/SConscript b/Core/ClientSMLSWIG/Python/SConscript index 27f074f16d..ff64812cfb 100644 --- a/Core/ClientSMLSWIG/Python/SConscript +++ b/Core/ClientSMLSWIG/Python/SConscript @@ -85,7 +85,7 @@ if "SOAR_PYTHON_ABI3" in env["ENV"]: clone.Append(CPPDEFINES = { 'Py_LIMITED_API': api_version }) else: print("'Requested building Python SML bindings with Python's Limited API, " - "while SWIG does not support it, aborting.'", file=sys.stderr) + f"but SWIG does not support it (need 4.2.0, have {'.'.join(env['SWIG_VERSION'])}); aborting.'", file=sys.stderr) Exit(1) else: print("SOAR_PYTHON_ABI3 not defined, building Python SML bindings with full (less portable) Python API...")