Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-46172: Enable linux_aarch64 #71

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,21 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-12"]
python-version: ["38", "39", "310", "311", "312", "313"]
runs-on: ${{ matrix.os }}
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')
env:
CIBW_BUILD: "cp3{8,9,10,11,12,13}-{manylinux_x86_64,manylinux_aarch64,macosx_arm64,macosx_x86_64}"
CIBW_BUILD: "cp${{ matrix.python-version }}-{manylinux_x86_64,manylinux_aarch64,macosx_arm64,macosx_x86_64}"
CIBW_ARCHS_MACOS: "x86_64 arm64"
# use line below to enable aarch64 builds
# CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_LINUX: "auto"
CIBW_ARCHS_LINUX: "auto aarch64"

steps:
# uncomment when building aarch64
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# if: runner.os == 'Linux'
# with:
# platforms: arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: runner.os == 'Linux'
with:
platforms: arm64

- uses: actions/checkout@v4
with:
Expand All @@ -141,7 +139,7 @@ jobs:
python -m cibuildwheel --output-dir dist
- uses: actions/upload-artifact@v4
with:
name: sphgeom-${{ matrix.os }}
name: sphgeom-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*

pipy_upload:
Expand Down
10 changes: 2 additions & 8 deletions tests/test_RangeSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import pickle
import sys
import unittest

from lsst.sphgeom import RangeSet
Expand Down Expand Up @@ -90,13 +89,8 @@ def testRanges(self):

def testString(self):
s = RangeSet(1, 10)
if sys.version_info[0] >= 3:
self.assertEqual(str(s), "[(1, 10)]")
self.assertEqual(repr(s), "RangeSet([(1, 10)])")
else:
# pybind11 maps C++ integers to Python long instances in Python 2.
self.assertEqual(str(s), "[(1L, 10L)]")
self.assertEqual(repr(s), "RangeSet([(1L, 10L)])")
self.assertEqual(str(s), "[(1, 10)]")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix ruff error and remove python2 code.

self.assertEqual(repr(s), "RangeSet([(1, 10)])")
self.assertEqual(s, eval(repr(s), {"RangeSet": RangeSet}))

def testPickle(self):
Expand Down
Loading