dep-mongoose/.github/workflows/quicktest.yml
2026-07-03 09:28:30 -03:00

271 lines
9 KiB
YAML

name: Build and test - essentials
on:
push:
paths:
- "**Makefile"
- "**.c"
- "**.h"
# Allow manual runs
workflow_dispatch:
env:
IPV6: 0
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cc: [gcc, clang++]
target: [test, mip_test, eth_test, ppp_test]
ssl: ["", BUILTIN]
exclude:
- target: eth_test
ssl: BUILTIN
- target: ppp_test
ssl: BUILTIN
name: linux ${{ matrix.target }} CC=${{ matrix.cc }} SSL=${{ matrix.ssl }}
env:
CC: ${{ matrix.cc }}
SSL: ${{ matrix.ssl }}
TFLAGS: -DMQTT_LOCALHOST
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: if [ "${{ matrix.target }}" == "test" ]; then ./test/setup_mqtt_server.sh ; fi && make -C test ${{ matrix.target }}
s390:
runs-on: ubuntu-latest
env:
TFLAGS: -DMQTT_LOCALHOST
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && ./test/setup_mqtt_server.sh && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test s390
armhf:
runs-on: ubuntu-latest
env:
TFLAGS: -DMQTT_LOCALHOST
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && ./test/setup_mqtt_server.sh && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test armhf
unamalgamated-mg_prefix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make -C test unamalgamated && make -C test mg_prefix
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
ssl: ["", BUILTIN]
name: macos SSL=${{ matrix.ssl }}
env:
SSL: ${{ matrix.ssl }}
TFLAGS: -DMQTT_LOCALHOST # -DNO_SNTP_CHECK
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: |
brew install mosquitto
/opt/homebrew/opt/mosquitto/sbin/mosquitto -c /Users/runner/work/mongoose/mongoose/test/mosquitto.conf.macos &
make -C test test ASAN_OPTIONS=
windows:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [vc98, vc22, mingw++]
name: windows ${{ matrix.target }}
env:
TFLAGS: -DMQTT_LOCALHOST
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: ./test/setup_mqtt_server.sh && make -C test ${{ matrix.target }}
arm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: make -C test arm
riscv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: make -C test riscv
tutorials:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: curl -sL https://github.com/Y2Z/monolith/releases/download/v2.10.1/monolith-gnu-linux-x86_64 -o /usr/local/bin/monolith ; chmod a+x /usr/local/bin/monolith
- run: make -C test tutorials_essential
- run: make -C test clean_tutorials_essential
tutorials_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
# - uses: egor-tensin/setup-mingw@v2
# with:
# platform: x64
- name: test they build
run: make -C test tutorials_win
shell: cmd
- name: test they clean
run: make -C test clean_tutorials_win
shell: cmd
tutorials_mac:
runs-on: macos-latest
env: { HOMEBREW_NO_AUTO_UPDATE: 1 }
steps:
- uses: actions/checkout@v5
- run: brew install monolith
- run: make -C test tutorials_mac
- run: make -C test clean_tutorials_mac
wizard_examples_arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- path: infineon/xmc47_relax-make-baremetal-builtin
- path: infineon/xmc_plt2go_4400-make-baremetal-builtin
- path: infineon/xmc72_evk-make-baremetal-builtin
- path: nxp/frdm-mcxn947-make-baremetal-builtin
- path: nxp/frdm-mcxn947-make-freertos-builtin
- path: nxp/rt1020-evk-make-baremetal-builtin
- path: nxp/rt1060-evk-make-baremetal-builtin
- path: nxp/rt1170-evk-make-baremetal-builtin
- path: stm32/nucleo-f429zi/minimal
- path: stm32/nucleo-f746zg/minimal
- path: stm32/nucleo-h563zi/minimal
- path: stm32/nucleo-h723zg/minimal
- path: stm32/nucleo-h723zg/minimal-bsd
- path: stm32/nucleo-h743zi/minimal
- path: stm32/stm32h573i-dk/minimal
- path: ti/ek-tm4c1294xl-make-baremetal-builtin
- path: ti/ek-tm4c1294xl-make-freertos-builtin
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: |
if ./test/match_changed_files.sh '^src'; then
echo GO=1 >> $GITHUB_ENV
sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
fi
- if: ${{ env.GO == 1 }}
run: make -C tutorials/${{ matrix.example.path }} build
generic_examples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- path: http/uart-bridge/esp32
- path: http/http-client/esp8266/http-client-server
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|^tutorials/http/uart-bridge|^tutorials/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: |
# nothing specific to install or do
- if: ${{ env.GO == 1 }}
run: make -C tutorials/${{ matrix.example.path }} build
generic_examples_arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- path: rp/pico-rm2
- path: stm32/nucleo-f429zi/minimal-rm2
- path: stm32/nucleo-f746zg/minimal-rm2
- path: stm32/nucleo-g031k8/minimal-w5500
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|^tutorials/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C tutorials/${{ matrix.example.path }} build
device_dashboard_examples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- path: esp32
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: |
if ./test/match_changed_files.sh '^src|tutorials/http/device-dashboard'; then
echo GO=1 >> $GITHUB_ENV
# nothing specific to install or do
fi
- if: ${{ env.GO == 1 }}
run: make -C tutorials/http/device-dashboard/${{ matrix.example.path }} build
device_dashboard_examples_arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- path: http/device-dashboard/microchip/same54-xpro
- path: nxp/rt1020-evk-make-freertos-builtin
- path: nxp/rt1060-evk-make-freertos-builtin
- path: nxp/rt1170-evk-make-freertos-builtin
- path: renesas/ek-ra6m4-make-baremetal-builtin
- path: rp/pico-rndis
- path: rp/pico-w
- path: rp/w55rp20-evb-pico
- path: rp/w5500-evb-pico
name: ${{ matrix.example.path }}
env:
GO: 0
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 2 }
- run: |
if ./test/match_changed_files.sh '^src|tutorials/http/device-dashboard|^tutorials/${{ matrix.example.path }}'; then
echo GO=1 >> $GITHUB_ENV
sudo apt -y update && sudo apt -y install gcc-arm-none-eabi
fi
- if: ${{ env.GO == 1 }}
run: make -C tutorials/${{ matrix.example.path }} build