diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index b1f88473..92fa2f8c 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -22,24 +22,24 @@ 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 }} @@ -47,7 +47,7 @@ jobs: 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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index ae4fbdd0..4a830649 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -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}} diff --git a/swmm-toolkit/setup.py b/swmm-toolkit/setup.py index 6d1fa3cc..7feeb1e2 100644 --- a/swmm-toolkit/setup.py +++ b/swmm-toolkit/setup.py @@ -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"] diff --git a/swmm-toolkit/test-requirements.txt b/swmm-toolkit/test-requirements.txt index 0cc9aaba..812ef65c 100644 --- a/swmm-toolkit/test-requirements.txt +++ b/swmm-toolkit/test-requirements.txt @@ -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