diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 296b66af..afcadfc9 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -60,7 +60,7 @@ jobs: fail-fast: false matrix: # Use Ubuntu 20.04 / Ubuntu 24.04 / macOS 13 x86_64 / macOS 14 arm64 + Python 3.10 to build SpiderMonkey - os: [ 'ubuntu-20.04', 'ubuntu-24.04', 'macos-13', 'macos-14' ] # macOS 14 runner exclusively runs on M1 hardwares + os: [ 'ubuntu-20.04', 'ubuntu-24.04', 'macos-13', 'macos-14', 'pi' ] # macOS 14 runner exclusively runs on M1 hardwares # see https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available python_version: [ '3.10' ] runs-on: ${{ matrix.os }} @@ -127,7 +127,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-20.04', 'ubuntu-24.04', 'macos-12', 'macos-14', 'windows-2022' ] + os: [ 'ubuntu-20.04', 'ubuntu-24.04', 'macos-12', 'macos-14', 'windows-2022', 'pi' ] python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] exclude: # actions/setup-python: The version '3.8'/'3.9' with architecture 'arm64' was not found for macOS. @@ -146,6 +146,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python_version }} + - name: Remove old poetry cache + run: rm -rf ~/.cache/pypoetry + if: ${{ matrix.os == 'pi' }} - name: Setup Poetry uses: snok/install-poetry@v1 with: @@ -162,9 +165,11 @@ jobs: fi echo "Installing python deps" poetry self add "poetry-dynamic-versioning[plugin]" - poetry env use python3 # use the correct Python version we've set up + poetry env use python$PYTHON_VERSION || poetry env use python3 # use the correct Python version we've set up poetry install --no-root --only=dev echo "Installed Dependencies" + env: + PYTHON_VERSION: ${{ matrix.python_version }} - name: Build Docs # only build docs once if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.11' }} run: | diff --git a/setup.sh b/setup.sh index c707111f..34ba0880 100755 --- a/setup.sh +++ b/setup.sh @@ -74,7 +74,7 @@ cd js/src mkdir -p _build cd _build mkdir -p ../../../../_spidermonkey_install/ -../configure \ +../configure --target=$(clang --print-target-triple) \ --prefix=$(realpath $PWD/../../../../_spidermonkey_install) \ --with-intl-api \ $(if [[ "$OSTYPE" != "msys"* ]]; then echo "--without-system-zlib"; fi) \ diff --git a/src/JSObjectProxy.cc b/src/JSObjectProxy.cc index 675219bf..13b3e609 100644 --- a/src/JSObjectProxy.cc +++ b/src/JSObjectProxy.cc @@ -245,7 +245,7 @@ bool JSObjectProxyMethodDefinitions::JSObjectProxy_richcompare_helper(JSObjectPr if (!js::GetPropertyKeys(GLOBAL_CX, *(self->jsObject), JSITER_OWNONLY, &props)) { PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSObjectProxyType.tp_name); - return NULL; + return false; } // iterate recursively through members of self and check for equality @@ -442,7 +442,7 @@ PyObject *JSObjectProxyMethodDefinitions::JSObjectProxy_repr(JSObjectProxy *self PyErr_Clear(); } - if (_PyUnicodeWriter_WriteASCIIString(&writer, "", 19) < 0) { + if (_PyUnicodeWriter_WriteASCIIString(&writer, "", 19) < 0) { goto error; } }