Skip to content

Commit 9b818a6

Browse files
authored
Merge pull request #136 from michaeltryby/dev-build
Update Actions UnitTest Workflow
2 parents c20e38e + eb75de2 commit 9b818a6

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

.github/workflows/build_wheel.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
- name: Install Python
3030
uses: actions/setup-python@v4
3131
with:
32-
python-version: 3.7
32+
python-version: 3.10
3333

3434
- name: Build wheel
3535
run: |
3636
pip install wheel
3737
python setup.py bdist_wheel
38-
- uses: actions/upload-artifact@v3
38+
- uses: actions/upload-artifact@v4
3939
with:
4040
path: nrtest-swmm/dist/*.whl
4141

@@ -46,8 +46,8 @@ jobs:
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
os: [ubuntu-latest, windows-2022, macos-12]
50-
pyver: [cp38, cp39, cp310, cp311, cp312]
49+
os: [ubuntu-latest, windows-latest, macos-latest]
50+
pyver: [cp39, cp310, cp311, cp312]
5151

5252
steps:
5353
- name: Checkout repo
@@ -56,7 +56,7 @@ jobs:
5656
submodules: true
5757

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

83-
- uses: actions/upload-artifact@v3
83+
- uses: actions/upload-artifact@v4
8484
with:
8585
path: ./wheelhouse/*.whl
8686

@@ -105,7 +105,7 @@ jobs:
105105
platforms: all
106106

107107
- name: Build wheels
108-
uses: pypa/cibuildwheel@v2.17.0
108+
uses: pypa/cibuildwheel@v3.1.4
109109
with:
110110
package-dir: ./swmm-toolkit
111111
env:
@@ -118,7 +118,7 @@ jobs:
118118
# only build current supported python: https://devguide.python.org/versions/
119119
# don't build pypy or musllinux to save build time. TODO: find a good way to support those archs
120120
CIBW_BUILD: ${{matrix.pyver}}-*
121-
CIBW_SKIP: cp36-* cp37-* pp* *-musllinux*
121+
CIBW_SKIP: cp36-* cp37-* cp-*38 pp* *-musllinux*
122122
CIBW_BUILD_VERBOSITY: 1
123123

124124
- uses: actions/upload-artifact@v4

.github/workflows/unit_test.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,27 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [windows-2022, macos-12, ubuntu-latest]
24+
os: [windows-latest, ubuntu-latest, macos-latest]
2525
include:
26-
- os: windows-2022
27-
sys_pkgs: choco install swig
26+
- os: windows-latest
2827
activate: ./build-env/Scripts/activate
2928

30-
- os: macos-12
31-
sys_pkgs: brew install swig ninja
29+
- os: macos-latest
3230
activate: source ./build-env/bin/activate
3331

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

3735
steps:
3836
- name: Checkout repo
39-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
4038
with:
4139
submodules: true
4240

4341
- name: Install Python
44-
uses: actions/setup-python@v4
42+
uses: actions/setup-python@v5
4543
with:
46-
python-version: "3.11"
47-
48-
- name: Install required system packages
49-
run: ${{matrix.sys_pkgs}}
44+
python-version: "3.10"
5045

5146
- name: Build wheel in virtual env
5247
run: |
@@ -60,4 +55,4 @@ jobs:
6055
run: |
6156
pip install -r test-requirements.txt
6257
pip install --no-index --find-links=./dist swmm_toolkit
63-
pytest
58+
pytest

swmm-toolkit/build-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ setuptools == 65.5.1
55
wheel == 0.38.1
66
scikit-build == 0.11.1
77
cmake == 3.21
8-
swig == 4.0.2
8+
swig == 4.0.2
9+
ninja; sys_platform == "darwin"

swmm-toolkit/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def run(self):
8888
cmake_args = ["-GVisual Studio 17 2022","-Ax64"]
8989

9090
elif platform_system == "Darwin":
91-
cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9"]
91+
cmake_args = ["-GNinja","-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0"]
9292

9393
else:
9494
cmake_args = ["-GUnix Makefiles"]

swmm-toolkit/src/swmm/toolkit/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ target_link_libraries(output
7474
set_target_properties(output
7575
PROPERTIES
7676
SUFFIX ${PYTHON_SUFFIX}
77-
SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API
77+
SWIG_COMPILE_DEFINITIONS EXPORT_OUT_API=
7878
MACOSX_RPATH TRUE
7979
SKIP_BUILD_RPATH FALSE
8080
BUILD_WITH_INSTALL_RPATH FALSE
@@ -139,7 +139,7 @@ target_link_libraries(solver
139139
set_target_properties(solver
140140
PROPERTIES
141141
SUFFIX ${PYTHON_SUFFIX}
142-
SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT
142+
SWIG_COMPILE_DEFINITIONS EXPORT_TOOLKIT=
143143
MACOSX_RPATH TRUE
144144
SKIP_BUILD_RPATH FALSE
145145
BUILD_WITH_INSTALL_RPATH FALSE

0 commit comments

Comments
 (0)