Skip to content

Commit 57731ae

Browse files
frozencemeterysimo5
authored andcommitted
Add PR CI using GitHub Actions
Signed-off-by: Robbie Harwood <[email protected]>
1 parent f9c0abb commit 57731ae

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
ubuntu:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
name: [ubuntu-clang, ubuntu-gcc]
11+
include:
12+
- name: ubuntu-clang
13+
compiler: clang
14+
cflags: -Wall -Wextra -Werror -Wno-cast-align -Wno-unused-parameter -Wno-missing-braces
15+
- name: ubuntu-gcc
16+
compiler: gcc
17+
cflags: -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-restrict
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
- name: Install dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y build-essential autopoint clang gcc docbook-{xsl,xml} libxml2-utils xml-core xsltproc lib{krb5,ini-config,keyutils,popt,selinux1,verto}-dev lib{nss,socket}-wrapper python3{,-colorama} valgrind krb5-{kdc,admin-server,kdc-ldap} ldap-utils slapd apparmor-utils
25+
- name: Configure
26+
env:
27+
CC: ${{ matrix.compiler }}
28+
run: |
29+
autoreconf -fiv
30+
./configure CC=$(which $CC)
31+
- name: Build
32+
env:
33+
CFLAGS: ${{ matrix.cflags }}
34+
run: |
35+
make -s CFLAGS="$CFLAGS"
36+
- name: Test
37+
env:
38+
CFLAGS: ${{ matrix.cflags }}
39+
run: |
40+
sudo aa-complain $(which slapd)
41+
make check CFALGS="$CFLAGS"

0 commit comments

Comments
 (0)