2020-12-18 19:26:17 +08:00
|
|
|
name: build
|
2023-02-05 02:45:05 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- "**Makefile"
|
|
|
|
- "**.c"
|
|
|
|
- "**.h"
|
2022-10-31 18:40:34 +08:00
|
|
|
env:
|
|
|
|
IPV6: 0
|
2020-12-18 18:41:27 +08:00
|
|
|
jobs:
|
2020-12-18 19:09:03 +08:00
|
|
|
linux:
|
2020-12-18 18:41:27 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-03-19 02:16:20 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-09-22 17:34:38 +08:00
|
|
|
cc: [gcc, clang, g++, clang++]
|
2022-11-29 18:20:22 +08:00
|
|
|
target: [test, mip_test]
|
|
|
|
# target: [test]
|
2022-03-19 02:16:20 +08:00
|
|
|
ssl: [MBEDTLS, OPENSSL]
|
|
|
|
name: linux ${{ matrix.target }} CC=${{ matrix.cc }} SSL=${{ matrix.ssl }}
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.cc }}
|
|
|
|
SSL: ${{ matrix.ssl }}
|
2020-12-18 18:41:27 +08:00
|
|
|
steps:
|
2022-03-07 12:59:25 +08:00
|
|
|
- uses: actions/checkout@v3
|
2023-02-05 02:45:05 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^test|^src/*.[ch]'
|
2023-02-05 02:45:05 +08:00
|
|
|
- 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 }}
|
2022-10-31 18:40:34 +08:00
|
|
|
s390:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-06 23:18:40 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^test|^src/*.[ch]'
|
2023-02-06 23:18:40 +08:00
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: sudo apt-get update && sudo apt-get install qemu binfmt-support qemu-user-static
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make s390
|
2022-10-31 18:40:34 +08:00
|
|
|
armhf:
|
|
|
|
runs-on: ubuntu-latest
|
2022-09-26 14:55:27 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-06 23:18:40 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^test|^src/*.[ch]'
|
2023-02-06 23:18:40 +08:00
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: sudo apt-get update && sudo apt-get install qemu binfmt-support qemu-user-static
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make armhf
|
2022-09-22 17:34:38 +08:00
|
|
|
linux2:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-06 23:18:40 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^test|^src/*.[ch]'
|
2023-02-06 23:18:40 +08:00
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: sudo apt-get update ; sudo apt-get install libmbedtls-dev valgrind
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make unamalgamated
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make valgrind
|
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make mg_prefix
|
2021-05-29 02:05:10 +08:00
|
|
|
examples:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-07 12:59:25 +08:00
|
|
|
- uses: actions/checkout@v3
|
2023-01-03 02:22:24 +08:00
|
|
|
- run: sudo apt -y install libmbedtls-dev libpcap-dev
|
2022-06-30 00:02:37 +08:00
|
|
|
- run: make clean examples
|
2022-10-31 18:40:34 +08:00
|
|
|
- run: make clean test MG_ENABLE_POLL=1
|
2020-12-18 19:09:03 +08:00
|
|
|
macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2022-03-07 12:59:25 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-11-24 15:02:17 +08:00
|
|
|
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install jq mbedtls openssl
|
2023-02-05 02:45:05 +08:00
|
|
|
- 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*/*`
|
2022-11-24 15:21:55 +08:00
|
|
|
#- run: make mip_test ASAN_OPTIONS=
|
2022-11-24 15:02:17 +08:00
|
|
|
- run: make mg_prefix
|
2020-12-18 19:12:08 +08:00
|
|
|
windows:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-07 12:59:25 +08:00
|
|
|
- uses: actions/checkout@v3
|
2023-02-05 02:45:05 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^test|^src/*.[ch]'
|
2023-02-05 02:45:05 +08:00
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make vc98 vc17 vc22 mingw mingw++
|
2022-11-11 16:50:57 +08:00
|
|
|
arduino-xiao:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-05 02:45:05 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^examples/arduino|^src/*.[ch]'
|
2023-02-05 02:45:05 +08:00
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make arduino-xiao
|
2021-05-29 01:30:42 +08:00
|
|
|
arm:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-07 12:59:25 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-30 00:02:37 +08:00
|
|
|
- run: make arm
|
2022-09-22 17:34:38 +08:00
|
|
|
riscv:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: make riscv
|
2022-03-19 02:16:20 +08:00
|
|
|
matrix_examples:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
example:
|
2022-10-12 20:54:04 +08:00
|
|
|
- path: esp32/device-dashboard
|
|
|
|
- path: esp32/uart-bridge
|
2022-12-28 07:27:56 +08:00
|
|
|
- path: esp8266/http-client-server
|
2023-01-22 19:31:06 +08:00
|
|
|
- path: stm32/nucleo-h743zi-baremetal
|
|
|
|
target: test
|
2022-10-12 20:54:04 +08:00
|
|
|
- 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
|
2023-01-20 05:42:06 +08:00
|
|
|
target: test
|
2022-12-07 02:53:18 +08:00
|
|
|
- path: stm32/nucleo-f429zi-freertos-mip
|
2022-12-26 21:51:44 +08:00
|
|
|
- path: stm32/nucleo-f429zi-usb-rndis
|
2022-10-12 20:54:04 +08:00
|
|
|
- path: stm32/nucleo-f746zg-baremetal
|
2023-02-02 06:49:14 +08:00
|
|
|
target: test
|
2022-12-07 02:53:18 +08:00
|
|
|
- path: stm32/nucleo-f746zg-freertos-mip
|
2022-12-26 21:51:44 +08:00
|
|
|
- path: stm32/nucleo-f746zg-usb-rndis
|
2022-10-12 20:54:04 +08:00
|
|
|
- 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
|
2022-11-12 07:15:01 +08:00
|
|
|
- path: ti/ek-tm4c1294xl-baremetal
|
2022-12-07 02:53:18 +08:00
|
|
|
- path: ti/ek-tm4c1294xl-freertos-mip
|
2023-01-18 00:59:05 +08:00
|
|
|
- path: rp2040/pico-rmii
|
|
|
|
- path: rp2040/pico-rndis-dashboard
|
2023-01-03 02:29:21 +08:00
|
|
|
- path: rp2040/pico-w
|
|
|
|
- path: rp2040/pico-w5500
|
2023-01-21 09:36:25 +08:00
|
|
|
target: test
|
2022-10-19 16:24:19 +08:00
|
|
|
name: ${{ matrix.example.path }}
|
2022-10-07 03:32:33 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-05 02:45:05 +08:00
|
|
|
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
|
2022-10-31 18:40:34 +08:00
|
|
|
- name: ${{ matrix.example.path }}
|
2023-02-05 02:45:05 +08:00
|
|
|
if: steps.check.outputs.MATCH == 1
|
2023-01-20 05:42:06 +08:00
|
|
|
run: make -C examples/${{ matrix.example.path }} ${{ matrix.example.target || 'build' }} VCON_API_KEY=${{secrets.VCON_API_KEY}}
|
2022-11-15 03:35:24 +08:00
|
|
|
zephyr_examples:
|
2022-10-07 03:32:33 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-03-19 02:16:20 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-05 02:45:05 +08:00
|
|
|
with: { fetch-depth: 2 }
|
|
|
|
- id: check
|
2023-02-08 05:16:42 +08:00
|
|
|
run: /bin/bash test/check.sh '^examples/zephyr|^src/*.[ch]'
|
2023-02-05 02:45:05 +08:00
|
|
|
- if: steps.check.outputs.MATCH == 1
|
|
|
|
run: make -C examples/zephyr init
|
2022-11-15 03:35:24 +08:00
|
|
|
- name: minify manifest
|
2023-02-05 02:45:05 +08:00
|
|
|
if: steps.check.outputs.MATCH == 1
|
2022-11-15 03:35:24 +08:00
|
|
|
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
|
2023-02-05 02:45:05 +08:00
|
|
|
- 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
|