lkmpg/.github/workflows/status-check.yaml
linD026 d6e1044aa7 CI: introduce GCC static analysis
Since GCC version 10, there has been a new option -fanalyzer for
static analysis. It can make the CI pipeline more comprehensive.

Also, the static analysis updates in GCC 11, but we cannot install
the GCC 11 in ubuntu 20.04 straightforwardly right now, which is
the GitHub workflow environment (see status-check.yaml).
For this reason, we stay at the GCC 10.

Close #117

Reference
- https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html
- https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10
- https://lwn.net/Articles/870290/
- https://developers.redhat.com/blog/2021/01/28/static-analysis-updates-in-gcc-11
- 7d73c3e9c5
2021-10-08 19:41:22 +08:00

26 lines
575 B
YAML

name: status-checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v2
- name: validate coding style and functionality
run: |
sudo apt-get install -q -y clang-format-11
sudo apt-get install -q -y cppcheck
sudo apt-get install -q -y gcc-10
.ci/check-format.sh
.ci/static-analysis.sh
.ci/build-n-run.sh
shell: bash