1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
name: Code Scanning
on:
push:
pull_request:
branches: [ master ]
env:
MAKEFLAGS: -j8
permissions:
actions: read
contents: read
security-events: write
jobs:
cccc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run cccc analysis
uses: sarnold/cccc-action@main
- uses: actions/upload-artifact@v4
with:
name: ${{ github.job }} logs
path: metrics
code-ql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/apt-install-deps
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
queries: security-and-quality
- name: Create Build Environment
run: |
mkdir -p ${{ github.workspace }}/{build,m4}
autoreconf --install
- name: Configure GNU Automake
working-directory: ${{ github.workspace }}/build
run: |
${{ github.workspace }}/configure \
--enable-aac \
--enable-aptx \
--enable-aptx-hd \
--with-libopenaptx \
--enable-faststream \
--enable-lc3-swb \
--enable-midi \
--enable-mp3lame \
--enable-mpg123 \
--enable-msbc \
--enable-ofono \
--enable-opus \
--enable-upower \
--enable-aplay \
--enable-cli \
--enable-rfcomm \
--enable-a2dpconf \
--enable-hcitop
- name: Build
working-directory: ${{ github.workspace }}/build
run: make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
doc8-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run reStructuredText Linter
uses: deep-entertainment/doc8-action@v5
with:
scanPaths: ${{ github.workspace }}
include-what-you-use:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/apt-install-deps
- name: Create Build Environment
run: |
mkdir -p ${{ github.workspace }}/{build,m4}
autoreconf --install
- name: Configure GNU Automake
working-directory: ${{ github.workspace }}/build
run: |
${{ github.workspace }}/configure \
--enable-debug \
--enable-debug-time \
--enable-aac \
--enable-aptx \
--enable-aptx-hd \
--with-libopenaptx \
--enable-faststream \
--enable-lc3-swb \
--enable-midi \
--enable-mp3lame \
--enable-mpg123 \
--enable-msbc \
--enable-ofono \
--enable-opus \
--enable-upower \
--enable-aplay \
--enable-cli \
--enable-rfcomm \
--enable-a2dpconf \
--enable-hcitop \
--enable-test
- name: Build
working-directory: ${{ github.workspace }}/build
run: bear -- make check TESTS=
- name: Run IWYU Check
run: |
jq 'del(.[] | select(.file | test("-ifaces?.c")))' \
${{ github.workspace }}/build/compile_commands.json > tmp.json \
&& mv tmp.json ${{ github.workspace }}/build/compile_commands.json
iwyu_tool -p ${{ github.workspace }}/build -- \
-Xiwyu --mapping_file=${{ github.workspace }}/.github/iwyu.imp \
-Xiwyu --keep=*/config.h \
-Xiwyu --no_fwd_decls
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Markdown Linter
uses: nosborn/github-action-markdown-cli@v3
with:
files: ${{ github.workspace }}
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run ShellCheck Scan
uses: redhat-plumbers-in-action/differential-shellcheck@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Spell Check
uses: rojopolis/spellcheck-github-actions@master
with:
config_path: .github/spellcheck.yaml
|