Skip to content

how about now?

how about now? #5

name: Test Z-Wave Stack Only
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
test-zwave-stack:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup WSL with Ubuntu
uses: Vampire/setup-wsl@v6
with:
distribution: Ubuntu-22.04
- name: Enable 32-bit architecture and install libraries
shell: wsl-bash {0}
run: |
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/bin/*.elf
- name: Copy storage to WSL native filesystem
run: |
wsl rm -rf ~/zwave_storage
wsl mkdir -p ~/zwave_storage/controller1
wsl mkdir -p ~/zwave_storage/controller2
wsl mkdir -p ~/zwave_storage/controller3
wsl mkdir -p ~/zwave_storage/enddevice1
wsl mkdir -p ~/zwave_storage/enddevice2
echo "Created storage directories in WSL home"
- name: Start Z-Wave stack and wait
shell: wsl-bash {0}
run: |
echo "Starting Z-Wave Stack (using WSL native filesystem ~/zwave_storage)..."
echo "Storage in ~/zwave_storage:"
ls -la ~/zwave_storage/
# Start controllers with WSL native storage
echo "Starting Controller 1 on port 5000..."
./zwave_stack/bin/ZW_zwave_ncp_serial_api_controller_25_9_0_x86_REALTIME_DEBUG.elf --port 5000 --storage ~/zwave_storage/controller1 &
echo "Starting Controller 2 on port 5001..."
./zwave_stack/bin/ZW_zwave_ncp_serial_api_controller_25_9_0_x86_REALTIME_DEBUG.elf --port 5001 --storage ~/zwave_storage/controller2 &
echo "Starting Controller 3 on port 5002..."
./zwave_stack/bin/ZW_zwave_ncp_serial_api_controller_25_9_0_x86_REALTIME_DEBUG.elf --port 5002 --storage ~/zwave_storage/controller3 &
# Start end devices
echo "Starting End Device 1 on port 5003..."
./zwave_stack/bin/ZW_zwave_ncp_serial_api_end_device_25_9_0_x86_REALTIME_DEBUG.elf --port 5003 --storage ~/zwave_storage/enddevice1 &
echo "Starting End Device 2 on port 5004..."
./zwave_stack/bin/ZW_zwave_ncp_serial_api_end_device_25_9_0_x86_REALTIME_DEBUG.elf --port 5004 --storage ~/zwave_storage/enddevice2 &
echo "All Z-Wave binaries started. Waiting 10 seconds..."
sleep 10
echo "Done waiting. Checking if processes are still running..."
ps aux | grep -E "ZW_zwave" | grep -v grep || echo "No Z-Wave processes found!"
echo "Killing all Z-Wave processes..."
pkill -f "ZW_zwave" || true
echo "Test complete."