Skip to content
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
16 changes: 8 additions & 8 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.10

- name: Build wheel
run: |
pip install wheel
python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: nrtest-swmm/dist/*.whl

Expand All @@ -46,8 +46,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2022, macos-12]
pyver: [cp38, cp39, cp310, cp311, cp312]
os: [ubuntu-latest, windows-latest, macos-latest]
pyver: [cp39, cp310, cp311, cp312]

steps:
- name: Checkout repo
Expand All @@ -56,7 +56,7 @@ jobs:
submodules: true

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v3.1.4
with:
package-dir: ./swmm-toolkit
env:
Expand All @@ -80,7 +80,7 @@ jobs:
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-macosx_arm64 *-macosx_universal2:arm64"
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

Expand All @@ -105,7 +105,7 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v3.1.4
with:
package-dir: ./swmm-toolkit
env:
Expand All @@ -118,7 +118,7 @@ jobs:
# 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: cp36-* cp37-* cp-*38 pp* *-musllinux*
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v4
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,27 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-12, ubuntu-latest]
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-2022
sys_pkgs: choco install swig
- os: windows-latest
activate: ./build-env/Scripts/activate

- os: macos-12
sys_pkgs: brew install swig ninja
- os: macos-latest
activate: source ./build-env/bin/activate

- os: ubuntu-latest
activate: source ./build-env/bin/activate

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

- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install required system packages
run: ${{matrix.sys_pkgs}}
python-version: "3.10"

- name: Build wheel in virtual env
run: |
Expand All @@ -60,4 +55,4 @@ jobs:
run: |
pip install -r test-requirements.txt
pip install --no-index --find-links=./dist swmm_toolkit
pytest
pytest
3 changes: 2 additions & 1 deletion swmm-toolkit/build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ setuptools == 65.5.1
wheel == 0.38.1
scikit-build == 0.11.1
cmake == 3.21
swig == 4.0.2
swig == 4.0.2
ninja; sys_platform == "darwin"
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 = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9"]
cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0"]

else:
cmake_args = ["-GUnix Makefiles"]
Expand Down
4 changes: 2 additions & 2 deletions swmm-toolkit/src/swmm/toolkit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ target_link_libraries(output
set_target_properties(output
PROPERTIES
SUFFIX ${PYTHON_SUFFIX}
SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API
SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API=
MACOSX_RPATH TRUE
SKIP_BUILD_RPATH FALSE
BUILD_WITH_INSTALL_RPATH FALSE
Expand Down Expand Up @@ -139,7 +139,7 @@ target_link_libraries(solver
set_target_properties(solver
PROPERTIES
SUFFIX ${PYTHON_SUFFIX}
SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT
SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT=
MACOSX_RPATH TRUE
SKIP_BUILD_RPATH FALSE
BUILD_WITH_INSTALL_RPATH FALSE
Expand Down
Loading