Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ad1c88e
Bump checkout and setup-python actions
michaeltryby Aug 31, 2025
6e5ef9b
Enhance artifact handling
michaeltryby Aug 31, 2025
e31109c
Fix wheel artifact upload path in workflow
michaeltryby Aug 31, 2025
bd59d64
Fix wheel artifact upload path in workflow
michaeltryby Aug 31, 2025
dca2b01
Fix wheel filename retrieval in workflow
michaeltryby Aug 31, 2025
efd6d42
Fix path for wheel artifact upload
michaeltryby Aug 31, 2025
d3f2188
Fix path for wheel artifact upload in workflow
michaeltryby Aug 31, 2025
eeab848
Fix artifact name handling in build_wheel.yml
michaeltryby Aug 31, 2025
6ec1150
Simplify get_wheel step in build_wheel.yml
michaeltryby Aug 31, 2025
61e659b
Fix syntax error in artifact upload step
michaeltryby Aug 31, 2025
3a68736
Update wheel artifact upload path in workflow
michaeltryby Aug 31, 2025
cf51a66
Update wheel artifact upload step in workflow
michaeltryby Aug 31, 2025
2ab1a85
Update artifact name for wheel uploads
michaeltryby Aug 31, 2025
32f5ae9
Update wheel artifact name to include python version
michaeltryby Aug 31, 2025
91108e2
Update macOS deployment target and skip Python versions
michaeltryby Aug 31, 2025
e2aaa24
Update cmake_args for macOS in setup.py
michaeltryby Aug 31, 2025
a0f808d
Add MACOSX_DEPLOYMENT_TARGET to unit test workflow
michaeltryby Aug 31, 2025
5da0156
Change macOS architecture from x86_64 to arm64
michaeltryby Aug 31, 2025
a5178ae
Fix MACOSX_DEPLOYMENT_TARGET format in workflow
michaeltryby Aug 31, 2025
083390b
Change MACOSX_DEPLOYMENT_TARGET to string format
michaeltryby Aug 31, 2025
f77c28d
Update macOS architecture settings in build workflow
michaeltryby Sep 1, 2025
4de8ffa
Update GitHub Actions workflow for building wheels
michaeltryby Sep 1, 2025
b08774a
Add Python 3.13 to build matrix in workflows
michaeltryby Sep 1, 2025
a620d26
Update test requirements for pytest and numpy
michaeltryby Sep 1, 2025
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
37 changes: 19 additions & 18 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: true
uses: actions/checkout@v5

- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.10
python-version: '3.10'

- name: Build wheel
run: |
pip install wheel
python setup.py bdist_wheel
- uses: actions/upload-artifact@v4

- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: nrtest-swmm-wheel
path: nrtest-swmm/dist/*.whl




build_wheels:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
pyver: [cp39, cp310, cp311, cp312]
pyver: [cp39, cp310, cp311, cp312, cp313]

steps:
- name: Checkout repo
Expand All @@ -60,6 +60,7 @@ jobs:
with:
package-dir: ./swmm-toolkit
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
CIBW_TEST_COMMAND: "pytest {package}/tests"
CIBW_BEFORE_TEST: pip install -r {package}/test-requirements.txt
# mac needs ninja to build
Expand All @@ -70,31 +71,31 @@ jobs:
# configure cibuildwheel to build native archs ('auto'), and some emulated ones
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_WINDOWS: AMD64
CIBW_ARCHS_MACOS: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64
# only build current supported python: https://devguide.python.org/versions/
# don't build pypy or musllinux to save build time. TODO: find a good way to support those archs
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_SKIP: cp36-* cp37-* pp* *-musllinux*
CIBW_SKIP: cp38-* pp* *-musllinux*
# Will avoid testing on emulated architectures
# Skip trying to test arm64 builds on Intel Macs
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64"
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_universal2:arm64"
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.pyver }}
path: ./wheelhouse/*.whl

build_cross_wheels:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,macos-12]
pyver: [cp38, cp39, cp310, cp311, cp312]
pyver: [cp39, cp310, cp311, cp312, cp313]

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
submodules: true

Expand All @@ -114,13 +115,13 @@ jobs:
CIBW_BEFORE_BUILD_LINUX: rm -f $(which swig) && rm -f $(which swig4.0)
# configure cibuildwheel to build native archs ('auto'), and some emulated ones
CIBW_ARCHS_LINUX: aarch64
CIBW_ARCHS_MACOS: arm64
# only build current supported python: https://devguide.python.org/versions/
# don't build pypy or musllinux to save build time. TODO: find a good way to support those archs
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_SKIP: cp36-* cp37-* cp-*38 pp* *-musllinux*
CIBW_SKIP: cp-*38 pp* *-musllinux*
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v4
with:
name: wheels-linux-aarch64-${{ matrix.pyver }}
path: ./wheelhouse/*.whl
2 changes: 2 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
python-version: "3.10"

- name: Build wheel in virtual env
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
run: |
python -m venv --clear ./build-env
${{matrix.activate}}
Expand Down
2 changes: 1 addition & 1 deletion swmm-toolkit/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def run(self):
cmake_args = ["-GVisual Studio 17 2022","-Ax64"]

elif platform_system == "Darwin":
cmake_args = ["-GXcode","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0"]
cmake_args = ["-GXcode"]

else:
cmake_args = ["-GUnix Makefiles"]
Expand Down
8 changes: 4 additions & 4 deletions swmm-toolkit/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@



pytest == 7.1.1
numpy == 1.21.6; python_version == "3.7"
numpy == 1.24.4; python_version < "3.12"
numpy == 1.26.2; python_version >= "3.12"
pytest == 8.4.1
numpy == 2.0.2; python_version < "3.10"
numpy == 2.2.6; python_version == "3.10.*"
numpy == 2.3.2; python_version >= "3.11"
aenum == 3.1.11
Loading