Files
neuron/.github/workflows/dev.yml
T
2021-10-08 01:51:16 +00:00

91 lines
2.2 KiB
YAML

name: EMQX Neuron dev workflow
on: [ push, pull_request, pull_request_target ]
jobs:
clang_format_check:
runs-on: ubuntu-20.04
steps:
# checkout
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Run clang-format style check for C/C++ programs.
uses: DoozyX/clang-format-lint-action@v0.12
with:
source: 'src plugins include tests'
exclude: 'include/vector.h'
clangFormatVersion: 10
style: file
compile_x86_64:
strategy:
matrix:
os: [ ubuntu-20.04 ]
name: [ release ]
system:
- [gcc-7, x86_64]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Compile
run: |
git submodule update --init --remote
sudo apt install -y cmake ninja-build libgtest-dev libssl-dev
sudo ./install-libs.sh -a
mkdir build && cd build && cmake .. && make
- name: Run unit test
run: cd build && ctest --output-on-failure
function_test:
strategy:
matrix:
os: [ ubuntu-20.04 ]
name: [ release ]
system:
- [gcc-7, x86_64]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Start neuron
run: |
git submodule update --init --remote
sudo apt install -y cmake ninja-build libgtest-dev libssl-dev
sudo ./install-libs.sh -a
mkdir build && cd build && cmake .. && make
- name: Run function test
run: |
sudo apt-get install python3-pip
pip3 install robotframework
pip3 install RESTinstance
python3 -m robot -P ft/ -d ft/reports ft
#- uses: actions/upload-artifact@v2
#with:
#name: ft-output
#path: "ft/reports/output.xml"
#- uses: actions/upload-artifact@v2
#with:
#name: ft-log
#path: "ft/reports/log.html"
#- uses: actions/upload-artifact@v2
#with:
#name: ft-report
#path: "ft/reports/report.html"