Skip to content

Set feature test macro for tests in one spot #437

Set feature test macro for tests in one spot

Set feature test macro for tests in one spot #437

Workflow file for this run

name: Run tests
on:
push:
pull_request:
schedule:
- cron: '3 20 * * SUN'
jobs:
test-autoconf:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cc: [gcc, clang]
posix: ['', -D_POSIX_C_SOURCE=200112L]
name: Autotools build on ${{matrix.os}} using ${{matrix.cc}} ${{matrix.posix}}
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.cc }}
VERBOSE: 1
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: sudo apt install libipc-run3-perl
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install autoconf automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- run: ./bootstrap
- run: ./configure
env:
# -Wno-unknown-pragmas because we have some Clang specific pragmas
# which aren't interesting to cause failures for.
CFLAGS: -std=c99 -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-parameter -Wno-unknown-pragmas ${{ matrix.posix }}
- run: make
- run: make check
test-cmake:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: CMake build on ${{matrix.os}}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: cmake -DBUILD_TESTING=ON .
- run: cmake --build .
- run: ctest -V . -C Debug