mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-15 09:49:19 +08:00
190 lines
7.1 KiB
YAML
190 lines
7.1 KiB
YAML
name: build
|
|
on:
|
|
push:
|
|
paths:
|
|
- "**Makefile"
|
|
- "**.c"
|
|
- "**.h"
|
|
env:
|
|
IPV6: 0
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
cc: [gcc, clang, g++, clang++]
|
|
target: [test, mip_test]
|
|
# target: [test]
|
|
ssl: [MBEDTLS, OPENSSL]
|
|
name: linux ${{ matrix.target }} CC=${{ matrix.cc }} SSL=${{ matrix.ssl }}
|
|
env:
|
|
CC: ${{ matrix.cc }}
|
|
SSL: ${{ matrix.ssl }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with: { fetch-depth: 2 }
|
|
- id: check
|
|
run: /bin/bash test/check.sh '^test|^src'
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: ./test/setup_ga_network.sh
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: sudo apt-get update ; sudo apt-get install libmbedtls-dev
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make ${{ matrix.target }}
|
|
s390:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: sudo apt-get update && sudo apt-get install qemu binfmt-support qemu-user-static
|
|
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
- run: make s390
|
|
armhf:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: sudo apt-get update && sudo apt-get install qemu binfmt-support qemu-user-static
|
|
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
- run: make armhf
|
|
linux2:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: sudo apt-get update ; sudo apt-get install libmbedtls-dev valgrind
|
|
- run: make unamalgamated
|
|
- run: make valgrind
|
|
- run: make mg_prefix
|
|
examples:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: sudo apt -y install libmbedtls-dev libpcap-dev
|
|
- run: make clean examples
|
|
- run: make clean test MG_ENABLE_POLL=1
|
|
macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install jq mbedtls openssl
|
|
- run: make test upload-coverage TFLAGS=-DNO_SNTP_CHECK SSL=OPENSSL ASAN_OPTIONS= OPENSSL=`echo /usr/local/Cellar/openssl*/*`
|
|
- run: make test SSL=MBEDTLS TFLAGS=-DNO_SNTP_CHECK ASAN_OPTIONS= MBEDTLS=`echo /usr/local/Cellar/mbedtls*/*`
|
|
#- run: make mip_test ASAN_OPTIONS=
|
|
- run: make mg_prefix
|
|
windows:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with: { fetch-depth: 2 }
|
|
- id: check
|
|
run: /bin/bash test/check.sh '^test|^src'
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make vc98 vc17 vc22 mingw mingw++
|
|
arduino-xiao:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with: { fetch-depth: 2 }
|
|
- id: check
|
|
run: /bin/bash test/check.sh '^examples/arduino|^src'
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make arduino-xiao
|
|
arm:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: make arm
|
|
riscv:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: make riscv
|
|
matrix_examples:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example:
|
|
- path: esp32/device-dashboard
|
|
- path: esp32/uart-bridge
|
|
- path: esp8266/http-client-server
|
|
- path: stm32/nucleo-h743zi-baremetal
|
|
target: test
|
|
- path: stm32/stm32-freertos-tcp
|
|
- path: stm32/stm32-nucleo-f746z
|
|
- path: stm32/stm32-nucleo-f746zg
|
|
- path: stm32/stm32-nucleo-f429z
|
|
- path: stm32/stm32-nucleo-h743z
|
|
- path: stm32/nucleo-f429zi-baremetal
|
|
target: test
|
|
- path: stm32/nucleo-f429zi-freertos-mip
|
|
- path: stm32/nucleo-f429zi-usb-rndis
|
|
- path: stm32/nucleo-f746zg-baremetal
|
|
target: test
|
|
- path: stm32/nucleo-f746zg-freertos-mip
|
|
- path: stm32/nucleo-f746zg-usb-rndis
|
|
- path: nxp/nxp-mimxrt1020-azurertos
|
|
- path: nxp/nxp-frdmk66f-freertos
|
|
- path: nxp/nxp-lpcxpresso54s018m-freertos
|
|
- path: nxp/nxp-mimxrt1020-freertos
|
|
- path: nxp/nxp-evkbimxrt1050-lwip-freertos
|
|
- path: nxp/nxp-evkmimxrt1020-lwip-freertos
|
|
- path: nxp/nxp-evkmimxrt1024-lwip-freertos
|
|
- path: nxp/nxp-evkmimxrt1060-lwip-freertos
|
|
- path: nxp/nxp-evkmimxrt1064-lwip-freertos
|
|
- path: nxp/nxp-evkmimxrt1160-cm7-lwip-freertos
|
|
- path: nxp/nxp-evkmimxrt1170-cm7-lwip-freertos
|
|
- path: nxp/nxp-frdmk64f-lwip-freertos
|
|
- path: nxp/nxp-frdmk66f-lwip-freertos
|
|
- path: nxp/nxp-lpcxpresso54018-lwip-freertos
|
|
- path: nxp/nxp-lpcxpresso54608-lwip-freertos
|
|
- path: nxp/nxp-lpcxpresso54618-lwip-freertos
|
|
- path: nxp/nxp-lpcxpresso54628-lwip-freertos
|
|
- path: nxp/nxp-twrk65f180m-lwip-freertos
|
|
- path: nxp/nxp-twrkv58f220m-lwip-freertos
|
|
- path: infineon/infineon-xmc4700_4800-lwip-rtx-rtos
|
|
- path: ti/ti-ek-tm4c1294xl-http-server
|
|
- path: ti/ek-tm4c1294xl-baremetal
|
|
- path: ti/ek-tm4c1294xl-freertos-mip
|
|
- path: rp2040/pico-rmii
|
|
- path: rp2040/pico-rndis-dashboard
|
|
- path: rp2040/pico-w
|
|
- path: rp2040/pico-w5500
|
|
target: test
|
|
name: ${{ matrix.example.path }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with: { fetch-depth: 2 }
|
|
- id: check
|
|
run: /bin/bash test/check.sh '^src|^examples/${{ matrix.example.path }}'
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: sudo apt -y install gcc-arm-none-eabi
|
|
- name: ${{ matrix.example.path }}
|
|
if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/${{ matrix.example.path }} ${{ matrix.example.target || 'build' }} VCON_API_KEY=${{secrets.VCON_API_KEY}}
|
|
zephyr_examples:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with: { fetch-depth: 2 }
|
|
- id: check
|
|
run: /bin/bash test/check.sh '^examples/zephyr|^src'
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr init
|
|
- name: minify manifest
|
|
if: steps.check.outputs.MATCH == 1
|
|
uses: mikefarah/yq@master
|
|
with:
|
|
cmd: yq -i eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $i ireduce({};setpath($i | path; $i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' examples/zephyr/zephyrproject/zephyr/west.yml
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr update
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr/device-dashboard build
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr/http-client build
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr/http-server build
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr/mqtt-aws-client build
|
|
- if: steps.check.outputs.MATCH == 1
|
|
run: make -C examples/zephyr/websocket-server build
|