Refactor MQTT-SN code #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu Build Test | |
on: | |
push: | |
branches: [ 'master', 'main', 'release/**' ] | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Install dependencies | |
run: | | |
# Don't prompt for anything | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update | |
# Install mosquitto | |
sudo apt-get install -y mosquitto bubblewrap | |
- name: Setup mosquitto broker | |
run: | | |
# Disable default broker daemon | |
sudo service mosquitto stop | |
sleep 1 | |
# This is some debug info useful if something goes wrong | |
- name: Show network status | |
run: | | |
sudo ifconfig | |
sudo route | |
sudo netstat -tulpan | |
- uses: actions/checkout@master | |
with: | |
repository: eclipse/paho.mqtt-sn.embedded-c | |
path: gateway | |
- name: Build gateway | |
working-directory: ./gateway/MQTTSNGateway | |
run: ./build.sh udp | |
- name: Write config to change broker | |
working-directory: ./gateway/MQTTSNGateway/bin | |
run: | | |
echo -n "GatewayID=1" | cat > gateway.conf | |
echo -n "GatewayName=PahoGateway-01" | cat >> gateway.conf | |
echo -n "MaxNumberOfClients=30" | cat >> gateway.conf | |
echo -n "KeepAlive=60" | cat >> gateway.conf | |
echo -n "BrokerName=localhost" | cat >> gateway.conf | |
echo -n "BrokerPortNo=1883" | cat >> gateway.conf | |
echo -n "AggregatingGateway=NO" | cat >> gateway.conf | |
echo -n "QoS-1=NO" | cat >> gateway.conf | |
echo -n "Forwarder=NO" | cat >> gateway.conf | |
echo -n "PredefinedTopic=NO" | cat >> gateway.conf | |
echo -n "ClientAuthentication=NO" | cat >> gateway.conf | |
echo -n "GatewayPortNo=10000" | cat >> gateway.conf | |
echo -n "MulticastPortNo=1883" | cat >> gateway.conf | |
echo -n "MulticastIP=225.1.1.1" | cat >> gateway.conf | |
echo -n "MulticastTTL=1" | cat >> gateway.conf | |
- name: Run gateway | |
working-directory: ./gateway/MQTTSNGateway/bin | |
run: ./MQTT-SNGateway | |
- uses: actions/checkout@master | |
with: | |
repository: wolfssl/wolfssl | |
path: wolfssl | |
- name: wolfssl autogen | |
working-directory: ./wolfssl | |
run: ./autogen.sh | |
- name: wolfssl configure | |
working-directory: ./wolfssl | |
run: ./configure --enable-enckeys | |
- name: wolfssl make | |
working-directory: ./wolfssl | |
run: make | |
- name: wolfssl make install | |
working-directory: ./wolfssl | |
run: sudo make install | |
- uses: actions/checkout@master | |
- name: wolfmqtt autogen | |
run: ./autogen.sh | |
- name: wolfmqtt configure with SN Enabled | |
env: | |
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1 | |
run: ./configure --enable-sn | |
- name: wolfmqtt make | |
run: make | |
- name: wolfmqtt make check | |
run: make check | |
- name: test SN Client | |
run: ./examples/sn-client/sn-client | |
# capture logs on failure | |
- name: Show logs on failure | |
if: failure() || cancelled() | |
run: | | |
cat test-suite.log |