Skip to content

Commit 0940f44

Browse files
Arm runner (#177)
* unit test start * Completion of PyNeoDeviceEx support in C. didn't compile yet. * add some console messages for libicsneo building * update settings test. * add device settings type check * Network Test should be functional now * update test to only run on arm named branches for now * Update macOS runner. * force minimum macos version
1 parent 90e05ed commit 0940f44

236 files changed

Lines changed: 2070 additions & 8440 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run Unit Tests
2+
on:
3+
push:
4+
branches:
5+
-'arm/**'
6+
pull_request:
7+
branches:
8+
-'arm/**'
9+
10+
jobs:
11+
test_arm64:
12+
if: github.repository == 'intrepidcs/python_ics'
13+
name: Linux ARM64 unit tests
14+
runs-on: [ self-hosted, Linux, ARM64, Hardware ]
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
fetch-depth: 0 # needed for history/tags
20+
21+
- name: Setup Python
22+
run: |
23+
python -m venv .venv
24+
source .venv/bin/activate
25+
python -m pip install --upgrade pip
26+
pip install .
27+
28+
- name: Run unit tests
29+
run: |
30+
source .venv/bin/activate
31+
sudo setcap cap_net_admin,cap_net_raw+ep $(realpath $(which python))
32+
python -m unittest discover -s tests.runner --verbose

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-20.04, windows-2019, macOS-13]
11+
os: [ubuntu-22.04, windows-2022, macOS-14]
1212

1313
steps:
1414
- uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ lib64/
2323
parts/
2424
sdist/
2525
var/
26+
gen/
2627
*.egg-info/
2728
.installed.cfg
2829
*.egg

.vscode/launch.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,25 @@
4949
"type": "cppvsdbg",
5050
"request": "attach",
5151
"pid": "${command:pickProcess}",
52-
}
52+
},
53+
/*
5354
{
5455
"name": "Debugger Attach lldb",
5556
"type": "lldb",
5657
"request": "attach",
5758
"pid": "${command:pickProcess}",
5859
}
60+
*/
61+
{
62+
"name": "Debugger attach gdbserver",
63+
"type": "gdb",
64+
"request": "attach",
65+
"executable": "python icsdebug.py",
66+
"target": "127.0.0.1:1234",
67+
"remote": true,
68+
"cwd": "${workspaceRoot}",
69+
"gdbpath": "gdb",
70+
"autorun": []
71+
},
5972
]
6073
}

build_libicsneo.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
LIBUSB_BUILD = f"{LIBUSB_ROOT}/build"
1515
LIBUSB_INSTALL = f"{LIBUSB_ROOT}/install"
1616

17-
LIBICSNEO_VERSION = "e37d939"
17+
LIBICSNEO_VERSION = "06f6861"
1818
LIBICSNEO_ROOT = f"{ROOT}/libicsneo/{LIBICSNEO_VERSION}"
1919
LIBICSNEO_SOURCE = f"{LIBICSNEO_ROOT}/source"
2020
LIBICSNEO_BUILD = f"{LIBICSNEO_ROOT}/build"
2121
LIBICSNEO_INSTALL = f"{LIBICSNEO_ROOT}/install"
22+
print(f"LIBICSNEO PATH: {LIBICSNEO_ROOT}")
2223

2324
LIBPCAP_VERSION = "1.10.4"
2425
LIBPCAP_ROOT = f"{ROOT}/libpcap/{LIBPCAP_VERSION}"
@@ -96,19 +97,23 @@ def _build_libpcap():
9697
subprocess.check_output(["make", "install"], cwd=LIBPCAP_BUILD)
9798

9899
def _build_libicsneo_linux():
100+
print("Cleaning libicsneo...")
99101
subprocess.check_output(["git", "clean", "-xdf"], cwd="libicsneo")
100102
subprocess.check_output(["mkdir", "-p", "libicsneo/build"])
101103

104+
print("cmake libicsneo...")
102105
subprocess.check_output(
103106
[
104107
"cmake",
105108
"-DCMAKE_BUILD_TYPE=Release",
106109
"-DLIBICSNEO_BUILD_ICSNEOLEGACY=ON",
107110
f"-DCMAKE_PREFIX_PATH={LIBUSB_INSTALL};{LIBPCAP_INSTALL}",
108111
"-S", LIBICSNEO_SOURCE,
109-
"-B", LIBICSNEO_BUILD
112+
"-B", LIBICSNEO_BUILD,
113+
"-Wno-dev",
110114
]
111115
)
116+
print("cmake build libicsneo...")
112117
subprocess.check_output(
113118
["cmake", "--build", LIBICSNEO_BUILD, "--target", "icsneolegacy", "--parallel", CPUS]
114119
)
@@ -132,8 +137,9 @@ def _build_libicsneo_macos():
132137
)
133138

134139
def build():
135-
print("Building libicsneo...")
140+
print("Building libusb...")
136141
_build_libusb()
142+
print("Building libpcap...")
137143
_build_libpcap()
138144
if sys.platform == "darwin":
139145
_build_libicsneo_macos()
@@ -156,6 +162,10 @@ def clean():
156162
if "--clean" in sys.argv:
157163
clean()
158164
exit(0)
165+
166+
print("Checking out libicsneo...")
159167
checkout()
168+
print("Building libicsneo...")
160169
build()
170+
print("Copy libicsneo...")
161171
copy()

gen/ics/__init__.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

gen/ics/__version.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

gen/ics/hiddenimports.py

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)