2022-01-31 04:20:15 -05:00
|
|
|
name: Main
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# TODO: something is wrong with TCC, Multiboot 2 info tag struct size
|
|
|
|
#cc: ['gcc', 'clang', 'tcc']
|
2022-02-01 22:02:05 -05:00
|
|
|
cc:
|
|
|
|
- cc: 'gcc'
|
|
|
|
werror: ''
|
|
|
|
- cc: 'clang'
|
|
|
|
# FIXME: -Werror: unknown warning option '-Wno-cast-function-type'
|
|
|
|
werror: '--disable-werror'
|
2022-01-31 04:20:15 -05:00
|
|
|
opt: ['', '-O0', '-O3']
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get --yes install clang tcc
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
2022-02-01 22:02:05 -05:00
|
|
|
run: ./configure --enable-tests ${{matrix.cc.werror}} CC='${{matrix.cc.cc}}' CFLAGS='${{matrix.opt}}'
|
2022-01-31 04:20:15 -05:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
|
|
|
run: make check || (cat test-suite.log && false)
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
|
|
|
cppcheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get --yes install cppcheck
|
|
|
|
- name: cppcheck source code
|
|
|
|
# TODO: don't suppress "src/printf.c"
|
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress='*:src/printf.c' 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/
|
2022-02-01 02:01:27 -05:00
|
|
|
|
|
|
|
cond:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
2022-02-01 21:26:35 -05:00
|
|
|
run: ./configure --enable-tests --without-all
|
2022-02-01 02:01:27 -05:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
|
|
|
run: make check || (cat test-suite.log && false)
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|