-
-
Notifications
You must be signed in to change notification settings - Fork 246
81 lines (67 loc) · 2.17 KB
/
osx-build-test-amd64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build and test wheels osx/amd64
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
osx-build:
name: Build wheel for OSX
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare snap7 archive
uses: ./.github/actions/prepare_snap7
- name: Prepare files
run: |
cp .github/build_scripts/arm64_osx.mk snap7-full-1.4.2/build/osx/
pushd snap7-full-1.4.2/build/osx/
make -f x86_64_osx.mk all
make -f arm64_osx.mk all
lipo -create -output /usr/local/lib/libsnap7.dylib ../bin/x86_64-osx/libsnap7.dylib ../bin/arm64-osx/libsnap7.dylib
install_name_tool -id /usr/local/lib/libsnap7.dylib /usr/local/lib/libsnap7.dylib
popd
mkdir -p snap7/lib/
cp /usr/local/lib/libsnap7.dylib snap7/lib/
- name: Build wheel
run: |
python3 -m build . --wheel -C="--build-option=--plat-name=macosx_10_9_universal2"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.whl
osx-test:
name: Testing wheels for OSX
needs: osx-build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macos-12", "macos-13", "macos-14", "macos-15"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
exclude:
- os: "macos-12"
python-version: "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Install python-snap7
run: |
python3 -m venv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install pytest
venv/bin/pip install dist/*.whl
- name: Run tests
run: |
venv/bin/pytest -m "server or util or client or mainloop"
sudo venv/bin/pytest -m partner