Skip to content

Commit 7c128fd

Browse files
initial threadx test
1 parent f74329f commit 7c128fd

1 file changed

Lines changed: 121 additions & 0 deletions

File tree

.github/workflows/threadx.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: ThreadXBuild Test
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'main', 'release/**' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-22.04
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Install dependencies
17+
run: |
18+
# Don't prompt for anything
19+
export DEBIAN_FRONTEND=noninteractive
20+
sudo apt-get update
21+
# Install mosquitto
22+
sudo apt-get install -y mosquitto bubblewrap cmake gcc-arm-none-eabi
23+
24+
- name: Setup mosquitto broker
25+
run: |
26+
# Disable default broker daemon
27+
sudo service mosquitto stop
28+
sleep 1
29+
30+
# This is some debug info useful if something goes wrong
31+
- name: Show network status
32+
run: |
33+
sudo ifconfig
34+
sudo route
35+
sudo netstat -tulpan
36+
37+
- name: Cache NetXDuo bundle
38+
id: cache-netxduo
39+
uses: actions/cache@v3
40+
with:
41+
path: ./v6.4.3_rel.tar.gz
42+
key: netxduo-bundle-v6.4.3_rel
43+
44+
- name: Download NetXDuo bundle if not cached
45+
if: steps.cache-netxduo.outputs.cache-hit != 'true'
46+
run: |
47+
wget https://github.com/eclipse-threadx/netxduo/archive/refs/tags/v6.4.3_rel.tar.gz
48+
49+
- name: Extract NetXDuo bundle
50+
run: |
51+
mkdir -p netxduo_src
52+
tar -xzf v6.4.3_rel.tar.gz -C netxduo_src --strip-components=1
53+
54+
- name: Install NetXDuo Dependencies
55+
working-directory: ./netxduo_src
56+
timeout-minutes: 10
57+
run: |
58+
./scripts/install.sh
59+
60+
- name: Build NetXDuo
61+
working-directory: ./netxduo_src
62+
run: |
63+
rm -rf test/cmake/threadx
64+
rm -rf test/cmake/filex
65+
./scripts/build_nxd64.sh
66+
67+
- uses: actions/checkout@master
68+
with:
69+
repository: wolfssl/wolfssl
70+
path: wolfssl
71+
- name: wolfssl autogen
72+
working-directory: ./wolfssl
73+
run: ./autogen.sh
74+
- name: wolfssl configure
75+
working-directory: ./wolfssl
76+
run: ./configure --enable-static --disable-shared --enable-enckeys --disable-examples --disable-benchmark --disable-crypttests CPPFLAGS="-I${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/inc" LDFLAGS="-L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/default_build_coverage/netxduo -lnetxduo -L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/threadx -lthreadx"
77+
- name: wolfssl make
78+
working-directory: ./wolfssl
79+
run: make
80+
- name: wolfssl make install
81+
working-directory: ./wolfssl
82+
run: sudo make install
83+
84+
- uses: actions/checkout@v4
85+
with:
86+
path: wolfmqtt
87+
- name: wolfmqtt autogen
88+
working-directory: ./wolfmqtt
89+
run: ./autogen.sh
90+
- name: wolfmqtt configure with TLS
91+
working-directory: ./wolfmqtt
92+
env:
93+
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1
94+
run: ./configure --enable-static --disable-shared --enable-all --enable-tls CPPFLAGS="-I${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/inc" LDFLAGS="-L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/default_build_coverage/netxduo -lnetxduo -L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/threadx -lthreadx"
95+
- name: wolfmqtt make
96+
working-directory: ./wolfmqtt
97+
run: make
98+
- name: wolfmqtt make check
99+
timeout-minutes: 3
100+
working-directory: ./wolfmqtt
101+
run: make check
102+
103+
- name: wolfmqtt configure with Multi-threading
104+
working-directory: ./wolfmqtt
105+
env:
106+
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1
107+
run: ./configure --enable-static --disable-shared --enable-all --enable-tls --enable-mt CPPFLAGS="-I${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/inc" LDFLAGS="-L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/default_build_coverage/netxduo -lnetxduo -L${{ github.workspace }}/netxduo_src/test/cmake/netxduo64/build/libs/threadx -lthreadx"
108+
- name: wolfmqtt make
109+
working-directory: ./wolfmqtt
110+
run: make
111+
- name: wolfmqtt make check
112+
timeout-minutes: 3
113+
working-directory: ./wolfmqtt
114+
run: make check
115+
116+
# capture logs on failure
117+
- name: Show logs on failure
118+
if: failure() || cancelled()
119+
run: |
120+
cat test-suite.log
121+
cat scripts/*.log

0 commit comments

Comments
 (0)