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:
|
2022-06-12 06:25:10 -04:00
|
|
|
cc: ['gcc', 'clang', 'tcc']
|
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-06-12 06:25:10 -04:00
|
|
|
run: ./configure --enable-tests --enable-tests-python CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
|
2022-01-31 04:20:15 -05:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
2022-06-12 04:42:43 -04:00
|
|
|
run: make check || (./test-suite-log && false)
|
2022-01-31 04:20:15 -05:00
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
2022-06-07 14:13:56 -04:00
|
|
|
cond:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
pkg:
|
|
|
|
- main: 'all'
|
|
|
|
- main: 'file'
|
|
|
|
- main: 'ntoa'
|
|
|
|
other: '--without-printf --without-units'
|
|
|
|
- main: 'printf'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure --without-${{matrix.pkg.main}} ${{matrix.pkg.other}} --enable-tests --enable-tests-python
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
2022-06-12 04:42:43 -04:00
|
|
|
run: make check || (./test-suite-log && false)
|
2022-06-07 14:13:56 -04:00
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
2022-05-24 09:30:00 -04:00
|
|
|
dist:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure dist
|
|
|
|
run: ./configure
|
|
|
|
- name: dist
|
|
|
|
run: make dist
|
|
|
|
- name: extract
|
2022-05-28 06:00:59 -04:00
|
|
|
run: tar -xzf libkernaux-0.3.0.tar.gz
|
|
|
|
- working-directory: libkernaux-0.3.0
|
2022-05-24 09:30:00 -04:00
|
|
|
name: configure
|
2022-05-24 13:46:19 -04:00
|
|
|
run: ./configure --enable-tests --enable-tests-python
|
2022-05-28 06:00:59 -04:00
|
|
|
- working-directory: libkernaux-0.3.0
|
2022-05-24 09:30:00 -04:00
|
|
|
name: make
|
|
|
|
run: make
|
2022-05-28 06:00:59 -04:00
|
|
|
- working-directory: libkernaux-0.3.0
|
2022-05-24 09:30:00 -04:00
|
|
|
name: check
|
2022-06-12 04:42:43 -04:00
|
|
|
run: make check || (./test-suite-log && false)
|
2022-05-28 06:00:59 -04:00
|
|
|
- working-directory: libkernaux-0.3.0
|
2022-05-24 09:30:00 -04:00
|
|
|
name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
2022-01-31 04:20:15 -05:00
|
|
|
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"
|
2022-06-10 02:02:54 -04:00
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress='*:src/printf.c' include/ src/ libc/ libm/
|
2022-01-31 04:20:15 -05:00
|
|
|
- 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/
|