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
|
name: ๐งช Test
on:
push:
paths-ignore:
- 'doc/**'
- '*.md'
branches:
- master
- release/**
pull_request:
paths-ignore:
- 'doc/**'
- '*.md'
branches:
- master
- release/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
c-lint:
name: ๐จ C lint
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'skip-lint')"
steps:
- uses: actions/checkout@v6
- uses: reviewdog/action-cpplint@master
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
targets: --recursive src
level: warning
flags: --linelength=120 # Optional
filter: "-readability/braces\
,-readability/casting\
,-readability/todo\
,-whitespace/comma\
,-whitespace/braces\
,-whitespace/comments\
,-whitespace/indent\
,-whitespace/newline\
,-whitespace/operators\
,-whitespace/parens\
,-whitespace/tab\
,-whitespace/end_of_line\
,-whitespace/line_length\
,-whitespace/blank_line\
,-whitespace/semicolon\
,-build/include_subdir\
,-build/include_order\
,-build/header_guard\
"
test-suite:
name: ๐ฌ test
needs: [c-lint]
if: "!contains(github.event.pull_request.labels.*.name, 'skip-test')"
strategy:
matrix:
compiler: [clang-14]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install dependencies
run: |
sudo apt-get update -qy
sudo apt-get install --no-install-recommends -y ${{ matrix.compiler }} cmake ninja-build libfreetype-dev libopencv-dev libcairo2-dev libgavl-dev
- name: ${{ matrix.compiler }} initialize cmake build
run: |
mkdir -p build && cd build
cmake -G "Ninja" ../
- name: ${{ matrix.compiler }} run ninja build
run: |
cd build && ninja
- name: ${{ matrix.compiler }} analyze plugins
run: |
cd test && make
- name: ${{ matrix.compiler }} upload plugin analysis
uses: actions/upload-artifact@v6
with:
name: release-plugin-analysis
path: test/*.json
|