mirror of
https://github.com/tailix/libkernaux.git
synced 2024-10-30 11:54:01 -04:00
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
cc: ['gcc', 'clang', 'tcc']
|
|
opt: ['', '-O0', '-O3']
|
|
assert: ['--enable-assert', '--disable-assert']
|
|
null_guard: ['--enable-null-guard', '--disable-null-guard']
|
|
werror:
|
|
- cflag: '-Werror'
|
|
mb2: '--disable-multiboot2'
|
|
- cflag: ''
|
|
mb2: '--enable-multiboot2'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: dependencies
|
|
run: sudo apt install clang cppcheck tcc
|
|
- name: autogen
|
|
run: ./autogen.sh
|
|
- name: configure
|
|
run: ./configure ${{matrix.assert}} ${{matrix.null_guard}} ${{matrix.werror.mb2}} CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}} ${{matrix.werror.cflag}}'
|
|
- name: make
|
|
run: make
|
|
- name: check
|
|
run: make check || cat test-suite.log
|
|
- name: cppcheck source code
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability include/ src/
|
|
- name: cppcheck examples
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress=duplicateExpression --suppress=staticStringCompare examples/
|
|
- name: cppcheck tests
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress=unusedStructMember tests/
|
|
- name: install
|
|
run: sudo make install
|