2021-09-23 20:01:13 +08:00
|
|
|
name: status-checks
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
validate:
|
2022-12-10 06:21:02 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2021-09-23 20:01:13 +08:00
|
|
|
steps:
|
|
|
|
- name: checkout code
|
2023-09-18 02:05:28 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-09-18 11:30:54 +08:00
|
|
|
- name: Test changed source files
|
|
|
|
id: changed-files
|
|
|
|
uses: tj-actions/changed-files@v39
|
|
|
|
with:
|
|
|
|
files: examples/**
|
2021-09-23 20:01:13 +08:00
|
|
|
- name: validate coding style and functionality
|
2023-09-18 11:30:54 +08:00
|
|
|
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
|
|
|
|
github.event_name == 'workflow_dispatch' }}
|
2021-09-23 20:01:13 +08:00
|
|
|
run: |
|
2022-12-10 06:21:02 +08:00
|
|
|
sudo apt-get install -q -y clang-format-12
|
2021-09-23 20:01:13 +08:00
|
|
|
sudo apt-get install -q -y cppcheck
|
2022-12-10 06:21:02 +08:00
|
|
|
sudo apt-get install -q -y gcc-11
|
2021-09-23 20:01:13 +08:00
|
|
|
.ci/check-format.sh
|
|
|
|
.ci/static-analysis.sh
|
|
|
|
.ci/build-n-run.sh
|
|
|
|
shell: bash
|