44 branches : [master]
55 pull_request :
66 branches : [master]
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}
9+ cancel-in-progress : true
710jobs :
811
912
1013 osx-build :
1114 name : Build wheel for OSX
12- runs-on : macos-13
15+ runs-on : macos-14
1316 steps :
1417 - name : Checkout
1518 uses : actions/checkout@v4
@@ -20,14 +23,16 @@ jobs:
2023 - name : Prepare files
2124 run : |
2225 cp .github/build_scripts/arm64_osx.mk snap7-full-1.4.2/build/osx/
26+ cp .github/build_scripts/x86_64_osx.mk snap7-full-1.4.2/build/osx/
2327 pushd snap7-full-1.4.2/build/osx/
2428 make -f x86_64_osx.mk all
2529 make -f arm64_osx.mk all
26- lipo -create -output /usr/local/lib/libsnap7.dylib ../bin/x86_64-osx/libsnap7.dylib ../bin/arm64-osx/libsnap7.dylib
27- install_name_tool -id /usr/local/lib/libsnap7.dylib /usr/local/lib/libsnap7.dylib
30+ mkdir -p snap7/lib/
31+ lipo -create -output snap7/lib/libsnap7.dylib ../bin/x86_64-osx/libsnap7.dylib ../bin/arm64-osx/libsnap7.dylib
32+ install_name_tool -id @rpath/libsnap7.dylib snap7/lib/libsnap7.dylib
2833 popd
2934 mkdir -p snap7/lib/
30- cp /usr/local /lib/libsnap7.dylib snap7/lib/
35+ cp snap7-full-1.4.2/build/osx/snap7 /lib/libsnap7.dylib snap7/lib/
3136
3237 - name : Build wheel
3338 run : |
3641 - name : Upload artifacts
3742 uses : actions/upload-artifact@v4
3843 with :
39- name : dist
44+ name : dist-osx-universal
4045 path : dist/*.whl
4146
4247
4651 runs-on : ${{ matrix.os }}
4752 strategy :
4853 matrix :
49- os : ["macos-13", "macos- 14", "macos-15"]
50- python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 ", "3.13 "]
54+ os : ["macos-14", "macos-15"]
55+ python-version : ["3.10 ", "3.11 ", "3.12 ", "3.13 ", "3.14 "]
5156
5257 steps :
5358 - name : Checkout
@@ -58,20 +63,26 @@ jobs:
5863 with :
5964 python-version : ${{ matrix.python-version }}
6065
66+ - name : Install uv
67+ uses : astral-sh/setup-uv@v5
68+ with :
69+ enable-cache : true
70+
6171 - name : Download artifacts
6272 uses : actions/download-artifact@v4
6373 with :
64- name : dist
74+ name : dist-osx-universal
6575 path : dist
6676
6777 - name : Install python-snap7
6878 run : |
69- python3 -m venv venv
70- venv/bin/pip install --upgrade pip
71- venv/bin/pip install pytest
72- venv/bin/pip install dist/*.whl
79+ uv venv
80+ uv pip install pytest
81+ uv pip install dist/*.whl
7382
83+ # Use --no-project to prevent uv from syncing pyproject.toml,
84+ # which would rebuild from source and lose the bundled snap7 library.
7485 - name : Run tests
7586 run : |
76- venv/bin/ pytest -m "server or util or client or mainloop"
77- sudo venv/bin/pytest -m partner
87+ uv run --no-project pytest -m "server or util or client or mainloop"
88+ sudo . venv/bin/pytest -m partner
0 commit comments