|
1 | | -name: mosquitto Tests |
2 | | - |
3 | | -# START OF COMMON SECTION |
4 | | -on: |
5 | | - push: |
6 | | - branches: [ 'master', 'main', 'release/**' ] |
7 | | - pull_request: |
8 | | - branches: [ '*' ] |
9 | | - |
10 | | -concurrency: |
11 | | - group: ${{ github.workflow }}-${{ github.ref }} |
12 | | - cancel-in-progress: true |
13 | | -# END OF COMMON SECTION |
14 | | - |
15 | | -jobs: |
16 | | - build_wolfssl: |
17 | | - name: Build wolfSSL |
18 | | - # Just to keep it the same as the testing target |
19 | | - runs-on: ubuntu-latest |
20 | | - # This should be a safe limit for the tests to run. |
21 | | - timeout-minutes: 4 |
22 | | - steps: |
23 | | - - name: Build wolfSSL |
24 | | - uses: wolfSSL/actions-build-autotools-project@v1 |
25 | | - with: |
26 | | - path: wolfssl |
27 | | - configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN" |
28 | | - install: true |
29 | | - |
30 | | - - name: tar build-dir |
31 | | - run: tar -zcf build-dir.tgz build-dir |
32 | | - |
33 | | - - name: Upload built lib |
34 | | - uses: actions/upload-artifact@v4 |
35 | | - with: |
36 | | - name: wolf-install-mosquitto |
37 | | - path: build-dir.tgz |
38 | | - retention-days: 5 |
39 | | - |
40 | | - mosquitto_check: |
41 | | - strategy: |
42 | | - fail-fast: false |
43 | | - matrix: |
44 | | - ref: [ 2.0.18 ] |
45 | | - name: ${{ matrix.ref }} |
46 | | - runs-on: ubuntu-latest |
47 | | - # This should be a safe limit for the tests to run. |
48 | | - timeout-minutes: 4 |
49 | | - needs: build_wolfssl |
50 | | - steps: |
51 | | - - name: Download lib |
52 | | - uses: actions/download-artifact@v4 |
53 | | - with: |
54 | | - name: wolf-install-mosquitto |
55 | | - |
56 | | - - name: untar build-dir |
57 | | - run: tar -xf build-dir.tgz |
58 | | - |
59 | | - - name: Checkout OSP |
60 | | - uses: actions/checkout@v4 |
61 | | - with: |
62 | | - repository: wolfssl/osp |
63 | | - path: osp |
64 | | - |
65 | | - - name: Install dependencies |
66 | | - run: | |
67 | | - export DEBIAN_FRONTEND=noninteractive |
68 | | - sudo apt-get update |
69 | | - sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make |
70 | | - sudo pip install --upgrade psutil |
71 | | -
|
72 | | - - name: Checkout mosquitto |
73 | | - uses: actions/checkout@v4 |
74 | | - with: |
75 | | - repository: eclipse/mosquitto |
76 | | - ref: v${{ matrix.ref }} |
77 | | - path: mosquitto |
78 | | - |
79 | | - - name: Configure and build mosquitto |
80 | | - run: | |
81 | | - cd $GITHUB_WORKSPACE/mosquitto/ |
82 | | - patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch |
83 | | - make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir |
84 | | -
|
85 | | - - name: Run mosquitto tests |
86 | | - working-directory: ./mosquitto |
87 | | - run: | |
88 | | - # Retry up to five times |
89 | | - for i in {1..5}; do |
90 | | - TEST_RES=0 |
91 | | - make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$? |
92 | | - if [ "$TEST_RES" -eq "0" ]; then |
93 | | - break |
94 | | - fi |
95 | | - done |
96 | | - if [ "$TEST_RES" -ne "0" ]; then |
97 | | - exit $TEST_RES |
98 | | - fi |
| 1 | +name: mosquitto Tests |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'master', 'main', 'release/**' ] |
| 7 | + pull_request: |
| 8 | + branches: [ '*' ] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | +# END OF COMMON SECTION |
| 14 | + |
| 15 | +jobs: |
| 16 | + build_wolfssl: |
| 17 | + name: Build wolfSSL |
| 18 | + # Just to keep it the same as the testing target |
| 19 | + runs-on: ubuntu-latest |
| 20 | + # This should be a safe limit for the tests to run. |
| 21 | + timeout-minutes: 4 |
| 22 | + steps: |
| 23 | + - name: Build wolfSSL |
| 24 | + uses: wolfSSL/actions-build-autotools-project@v1 |
| 25 | + with: |
| 26 | + path: wolfssl |
| 27 | + configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN" |
| 28 | + install: true |
| 29 | + |
| 30 | + - name: tar build-dir |
| 31 | + run: tar -zcf build-dir.tgz build-dir |
| 32 | + |
| 33 | + - name: Upload built lib |
| 34 | + uses: actions/upload-artifact@v4 |
| 35 | + with: |
| 36 | + name: wolf-install-mosquitto |
| 37 | + path: build-dir.tgz |
| 38 | + retention-days: 5 |
| 39 | + |
| 40 | + mosquitto_check: |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + ref: [ 2.0.18 ] |
| 45 | + name: ${{ matrix.ref }} |
| 46 | + runs-on: ubuntu-latest |
| 47 | + # This should be a safe limit for the tests to run. |
| 48 | + timeout-minutes: 4 |
| 49 | + needs: build_wolfssl |
| 50 | + steps: |
| 51 | + - name: Download lib |
| 52 | + uses: actions/download-artifact@v4 |
| 53 | + with: |
| 54 | + name: wolf-install-mosquitto |
| 55 | + |
| 56 | + - name: untar build-dir |
| 57 | + run: tar -xf build-dir.tgz |
| 58 | + |
| 59 | + - name: Checkout OSP |
| 60 | + uses: actions/checkout@v4 |
| 61 | + with: |
| 62 | + repository: wolfssl/osp |
| 63 | + path: osp |
| 64 | + |
| 65 | + - name: Install dependencies |
| 66 | + run: | |
| 67 | + export DEBIAN_FRONTEND=noninteractive |
| 68 | + sudo apt-get update |
| 69 | + sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make |
| 70 | + sudo pip install --upgrade psutil |
| 71 | +
|
| 72 | + - name: Checkout mosquitto |
| 73 | + uses: actions/checkout@v4 |
| 74 | + with: |
| 75 | + repository: eclipse/mosquitto |
| 76 | + ref: v${{ matrix.ref }} |
| 77 | + path: mosquitto |
| 78 | + |
| 79 | + - name: Configure and build mosquitto |
| 80 | + run: | |
| 81 | + cd $GITHUB_WORKSPACE/mosquitto/ |
| 82 | + patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch |
| 83 | + make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir |
| 84 | +
|
| 85 | + - name: Run mosquitto tests |
| 86 | + working-directory: ./mosquitto |
| 87 | + run: | |
| 88 | + # Retry up to five times |
| 89 | + for i in {1..5}; do |
| 90 | + TEST_RES=0 |
| 91 | + make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$? |
| 92 | + if [ "$TEST_RES" -eq "0" ]; then |
| 93 | + break |
| 94 | + fi |
| 95 | + done |
| 96 | + if [ "$TEST_RES" -ne "0" ]; then |
| 97 | + exit $TEST_RES |
| 98 | + fi |
0 commit comments