-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.86 KB
/
run-zwave-wsl.yml
File metadata and controls
66 lines (55 loc) · 1.86 KB
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
name: Run Z-Wave Stack (Windows + WSL)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
run-zwave-wsl:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup WSL with Debian
uses: Vampire/setup-wsl@v6
with:
distribution: Debian
- name: Enable 32-bit architecture and install libraries
shell: wsl-bash {0}
run: |
# Remove stale backports entry from sources.list
sudo sed -i '/backports/d' /etc/apt/sources.list
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libc6:i386 libstdc++6:i386
- name: Make Z-Wave binaries executable
shell: wsl-bash {0}
run: chmod +x zwave_stack/*.elf
- name: Start Z-Wave stack and verify output
shell: wsl-bash {0}
run: |
# Start the Z-Wave stack and capture output
bash ./start-zwave-stack.sh > /tmp/zwave-output.log 2>&1 &
# Wait for services to start
sleep 5
# Show the output
cat /tmp/zwave-output.log
# Verify expected output
if grep -q "All Z-Wave binaries started!" /tmp/zwave-output.log; then
echo "[OK] Z-Wave stack started successfully"
else
echo "[FAIL] Failed to find expected output"
exit 1
fi
- name: Test TCP connection from Windows
shell: powershell
run: |
Write-Host "Testing TCP connectivity to WSL Z-Wave stack on port 5000..."
$connection = Test-NetConnection -ComputerName localhost -Port 5000 -WarningAction SilentlyContinue
if ($connection.TcpTestSucceeded) {
Write-Host "[OK] Port 5000 is accessible from Windows"
} else {
Write-Host "[FAIL] Port 5000 is NOT accessible from Windows"
exit 1
}