5
5
pull_request :
6
6
branches : [master]
7
7
jobs :
8
- arm32 -build :
8
+ linux -build-arm32v7 :
9
9
name : Build arm32 wheel
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- name : Checkout
13
13
uses : actions/checkout@v3
14
14
15
- - name : prepare snap7 archive
15
+ - name : Prepare snap7 archive
16
16
uses : ./.github/actions/prepare_snap7
17
17
18
18
- name : Set up QEMU
19
19
uses : docker/setup-qemu-action@v2
20
20
with :
21
21
platforms : arm
22
-
23
- - name : Build libsnap7.so
24
- run : |
25
- docker run --rm --interactive -v $PWD/snap7-full-1.4.2:/snap7-full-1.4.2 "arm32v7/gcc:latest" /bin/bash -s <<EOF
26
- cd snap7-full-1.4.2/build/unix/
27
- make -f arm_v7_linux.mk all
28
- EOF
29
-
30
- - name : Build pure python wheel
31
- run : python3 setup.py bdist_wheel --plat-name=linux_armv7l
32
-
33
- - name : Repack wheel
34
- run : |
35
- unpack_tmp_dir=unpack_tmp_dir
36
- mkdir -p $unpack_tmp_dir
37
- packagename=$(python3 -m wheel unpack $(ls dist/*linux_armv7l.whl) -d $unpack_tmp_dir | sed -e 's/.*\/\(.*\)...OK/\1/')
38
- echo $packagename
39
- mkdir -p $unpack_tmp_dir/$packagename/snap7/lib
40
- cp snap7-full-1.4.2/build/bin/arm_v7-linux/libsnap7.so $unpack_tmp_dir/$packagename/snap7/lib/
41
- mkdir -p wheelhouse/linux_armv7l
42
- python3 -m wheel pack $unpack_tmp_dir/$packagename -d wheelhouse/linux_armv7l/
22
+
23
+ - name : Build wheel
24
+ uses : ./.github/actions/linux_armv7l
25
+ with :
26
+ script : ./.github/build_scripts/build_package.sh
27
+ platform : manylinux_2_24_armv7l
28
+ makefile : arm_v7_linux.mk
29
+ python : /usr/local/bin/python3
43
30
44
31
- name : Upload artifacts
45
32
uses : actions/upload-artifact@v3
46
33
with :
47
34
name : wheels
48
- path : wheelhouse/*/* .whl
35
+ path : wheelhouse/*.whl
49
36
50
- test-wheel :
37
+ test-wheels-arm32 :
51
38
name : Testing wheel
52
- needs : arm32 -build
39
+ needs : linux -build-arm32v7
53
40
runs-on : ubuntu-latest
54
41
strategy :
55
42
matrix :
@@ -68,11 +55,14 @@ jobs:
68
55
uses : docker/setup-qemu-action@v2
69
56
with :
70
57
platforms : arm
71
-
58
+
72
59
- name : Run tests in docker:arm32v7
73
60
run : |
74
- docker run --platform linux/arm/v7 --rm --interactive -v $PWD/tests:/tests -v $PWD/setup.cfg:/setup.cfg \
75
- -v $PWD/wheelhouse:/wheelhouse "arm32v7/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF
76
- python -m pip install pytest pytest-asyncio $(ls wheelhouse/linux_armv7l/*.whl)
61
+ docker run --platform linux/arm/v7 --rm --interactive -v $PWD/tests:/tests \
62
+ -v $PWD/pyproject.toml:/pyproject.toml \
63
+ -v $PWD/wheelhouse:/wheelhouse \
64
+ "arm32v7/python:${{ matrix.python-version }}-buster" /bin/bash -s <<EOF
65
+ python -m pip install pytest pytest-asyncio $(ls wheelhouse/*manylinux_2_24_armv7l.whl)
77
66
python -m pytest tests/ -m "server or util or client or mainloop or partner"
78
67
EOF
68
+
0 commit comments