-
Notifications
You must be signed in to change notification settings - Fork 240
46 lines (45 loc) · 1.24 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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@v4
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:
CFLAGS: -std=c99 -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-parameter ${{ 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@v4
with:
submodules: true
- run: cmake -DBUILD_TESTING=ON .
- run: cmake --build .
- run: ctest -V . -C Debug