Skip to content

Commit

Permalink
Update Ubuntu runner image to get later SWIG
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
garfieldnate committed May 17, 2024
1 parent e265975 commit 00abbae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Core/ClientSMLSWIG/Python/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down

0 comments on commit 00abbae

Please sign in to comment.