Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wolfSSL/wolfMQTT into WOL…
Browse files Browse the repository at this point in the history
…FMQTT_EXAMPLE_CERT
  • Loading branch information
gojimmypi committed Dec 15, 2023
2 parents d73abeb + 15ba2f2 commit 620470b
Show file tree
Hide file tree
Showing 61 changed files with 8,316 additions and 5,198 deletions.
53 changes: 47 additions & 6 deletions .github/workflows/fsanitize-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: fsanitize check Test

on:
push:
branches: [ '*' ]
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]

Expand All @@ -11,17 +11,40 @@ jobs:

runs-on: ubuntu-latest
timeout-minutes: 5
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1

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: wolfssl/wolfssl
path: wolfssl
- name: wolfssl autogen
working-directory: ./wolfssl
working-directory: ./wolfssl
run: ./autogen.sh
- name: wolfssl configure
working-directory: ./wolfssl
working-directory: ./wolfssl
run: ./configure --enable-enckeys
- name: wolfssl make
working-directory: ./wolfssl
Expand All @@ -32,27 +55,45 @@ jobs:
- uses: actions/checkout@master
- name: autogen
run: ./autogen.sh

- name: configure
run: ./configure CC="gcc -fsanitize=address"
- name: make
run: make
- name: make check
run: make check

- name: configure without TLS
run: ./configure CC="gcc -fsanitize=address" --enable-all --disable-tls
- name: make
run: make
- name: make check
run: make check

- name: configure with SN Enabled
run: ./configure --enable-sn CC="gcc -fsanitize=address"
run: ./configure CC="gcc -fsanitize=address" --enable-sn
- name: make
run: make
- name: make check
run: make check

- name: configure with Non-Block
run: ./configure --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK" CC="gcc -fsanitize=address"
run: ./configure CC="gcc -fsanitize=address" --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
run: make check

- name: configure with Non-Block and Multi-threading
run: ./configure --enable-mt --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK" CC="gcc -fsanitize=address"
run: ./configure CC="gcc -fsanitize=address" --enable-mt --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
run: make check

# capture logs on failure
- name: Show logs on failure
if: failure() || cancelled()
run: |
cat test-suite.log
cat scripts/*.log
34 changes: 30 additions & 4 deletions .github/workflows/macos-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ name: macOS Build Test

on:
push:
branches: [ '*' ]
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]

env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1

jobs:
build:

Expand All @@ -17,43 +20,66 @@ jobs:
repository: wolfssl/wolfssl
path: wolfssl
- name: brew
run: brew install automake libtool
run: |
brew install automake libtool md5sha1sum mosquitto
echo "/usr/local/sbin/" >> $GITHUB_PATH
echo "/usr/local/opt/mosquitto/sbin/" >> $GITHUB_PATH
- name: wolfssl autogen
working-directory: ./wolfssl
working-directory: ./wolfssl
run: ./autogen.sh
- name: wolfssl configure
working-directory: ./wolfssl
working-directory: ./wolfssl
run: ./configure --enable-enckeys
- name: wolfssl make
working-directory: ./wolfssl
run: make
- name: wolfssl make install
working-directory: ./wolfssl
run: make install

- uses: actions/checkout@master
- name: autogen
run: ./autogen.sh

- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check

- name: configure without TLS
run: ./configure --enable-all --disable-tls
- name: make
run: make
- name: make check
run: make check

- name: configure with SN Enabled
run: ./configure --enable-sn
- name: make
run: make
- name: make check
run: make check

- name: configure with Non-Block
run: ./configure --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
run: make check

- name: configure with Non-Block and Multi-threading
run: ./configure --enable-mt --enable-nonblock CFLAGS="-DWOLFMQTT_TEST_NONBLOCK"
- name: make
run: make
- name: make check
run: make check

# capture logs on failure
- name: Show logs on failure
if: failure() || cancelled()
run: |
cat test-suite.log
cat scripts/*.log
103 changes: 103 additions & 0 deletions .github/workflows/mqtt-sn-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: MQTT-SN 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
mosquitto -v &> ~/broker.log &
sleep 1
- 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 -DDEBUG -DDEBUG_NW
- name: Write config to change broker
working-directory: ./gateway/MQTTSNGateway/bin
run: |
printf "GatewayID=1\nGatewayName=PahoGateway-01\nMaxNumberOfClients=30\nKeepAlive=60\nBrokerName=localhost\nBrokerPortNo=1883\nAggregatingGateway=NO\nQoS-1=NO\nForwarder=NO\nPredefinedTopic=NO\nClientAuthentication=NO\nGatewayPortNo=10000\nMulticastPortNo=1883\nMulticastIP=225.1.1.1\nMulticastTTL=1\n" > gateway.conf
- name: Display gateway config
working-directory: ./gateway/MQTTSNGateway/bin
run: more gateway.conf
- name: Run gateway
working-directory: ./gateway/MQTTSNGateway/bin
run: sudo ./MQTT-SNGateway &> ~/gateway.log &
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: 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
run: |
export WOLFMQTT_NO_EXTERNAL_BROKER_TESTS=1
./configure --enable-sn
- name: wolfmqtt make
run: make

- name: test SN Client
run: ./examples/sn-client/sn-client -T

# Cleanup
- name: Stop gateway
if: failure() || cancelled()
run: |
sudo kill -2 $(pgrep -f "MQTT-SNGateway")
sleep 3
sudo kill -2 $(pgrep -f "mosquitto")
sleep 1
# capture logs on failure
- name: Show logs on failure
if: failure() || cancelled()
run: |
sudo cat ~/gateway.log
sudo cat ~/broker.log
106 changes: 106 additions & 0 deletions .github/workflows/ubuntu-check-curl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Ubuntu Build Test with Curl Support

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: wolfssl/wolfssl
path: wolfssl
- name: wolfssl autogen
working-directory: ./wolfssl
run: ./autogen.sh
- name: wolfssl configure
working-directory: ./wolfssl
run: ./configure --enable-curl
- name: wolfssl make
working-directory: ./wolfssl
run: make
- name: wolfssl make install
working-directory: ./wolfssl
run: sudo make install

- uses: actions/checkout@master
with:
repository: curl/curl
path: curl
- name: curl autoreconf
working-directory: ./curl
run: autoreconf -fi
- name: curl configure
working-directory: ./curl
run: ./configure --with-wolfssl
- name: curl make
working-directory: ./curl
run: make
- name: curl make install
working-directory: ./curl
run: sudo make install

- uses: actions/checkout@master
- name: wolfmqtt autogen
run: ./autogen.sh

- name: wolfmqtt configure
run: ./configure
- name: wolfmqtt make
run: make
# Note: this will run the external tests for this CI only
- name: wolfmqtt make check
run: make check

- name: wolfmqtt configure with libCurl Enabled
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1
run: ./configure --enable-curl
- name: wolfmqtt make
run: make
- name: wolfmqtt make check
run: make check

- name: wolfmqtt configure with libCurl Enabled without TLS
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1
run: ./configure --enable-curl --disable-tls
- name: wolfmqtt make
run: make
- name: wolfmqtt make check
run: make check

# capture logs on failure
- name: Show logs on failure
if: failure() || cancelled()
run: |
cat test-suite.log
cat scripts/*.log
Loading

0 comments on commit 620470b

Please sign in to comment.