Files
libcoap/.github/workflows/main.yml
T

60 lines
2.1 KiB
YAML

name: Build Tests
on:
push:
# for now, trigger only on push to test branch gh-workflows
# later, will be push/pull_request to all main, develop, and 'release-*'
branches:
- gh-workflows
env:
PLATFORM: posix
TESTS: yes
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
CC: ["gcc", "clang"]
TLS: ["no", "openssl", "gnutls", "mbedtls"]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: setup
run: |
sudo apt-get update && sudo apt-get install -y libcunit1-dev libmbedtls-dev libgnutls28-dev libtool libtool-bin exuberant-ctags valgrind graphviz doxygen libxml2-utils xsltproc docbook-xml docbook-xsl asciidoc
./autogen.sh
- name: configure no-TLS
if: matrix.TLS == 'no'
run: |
mkdir build-${{matrix.TLS}}-${{matrix.CC}}
cd build-${{matrix.TLS}}-${{matrix.CC}}
$GITHUB_WORKSPACE/configure --enable-tests --disable-dtls CC=${{matrix.CC}}
- name: configure TLS
if: matrix.TLS != 'no'
run: |
mkdir build-${{matrix.TLS}}-${{matrix.CC}}
cd build-${{matrix.TLS}}-${{matrix.CC}}
"$GITHUB_WORKSPACE/configure" --enable-tests --with-${{matrix.TLS}} CC=${{matrix.CC}}
- name: compile
run: |
cd build-${{matrix.TLS}}-${{matrix.CC}}
make
- name: test
run: |
cd build-${{matrix.TLS}}-${{matrix.CC}}
libtool --mode=execute valgrind --track-origins=yes --leak-check=yes --show-reachable=yes --error-exitcode=123 --quiet --suppressions=$GITHUB_WORKSPACE/tests/valgrind_suppression tests/testdriver
- name: OSS Fuzz
if: matrix.TLS == 'openssl' # run only once for each compiler
run: |
cd build-${{matrix.TLS}}-${{matrix.CC}}
make -C tests/oss-fuzz -f Makefile.ci check clean
- name: manual page examples check
if: matrix.TLS == 'openssl' # run only once for each compiler
run: |
cd build-${{matrix.TLS}}-${{matrix.CC}}
make -C man
man/examples-code-check man