Skip to content

Commit

Permalink
Add PR CI using GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Robbie Harwood <[email protected]>
  • Loading branch information
frozencemetery authored and simo5 committed Apr 9, 2020
1 parent f9c0abb commit 57731ae
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI
on: [push, pull_request]

jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: [ubuntu-clang, ubuntu-gcc]
include:
- name: ubuntu-clang
compiler: clang
cflags: -Wall -Wextra -Werror -Wno-cast-align -Wno-unused-parameter -Wno-missing-braces
- name: ubuntu-gcc
compiler: gcc
cflags: -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-restrict
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
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
- name: Configure
env:
CC: ${{ matrix.compiler }}
run: |
autoreconf -fiv
./configure CC=$(which $CC)
- name: Build
env:
CFLAGS: ${{ matrix.cflags }}
run: |
make -s CFLAGS="$CFLAGS"
- name: Test
env:
CFLAGS: ${{ matrix.cflags }}
run: |
sudo aa-complain $(which slapd)
make check CFALGS="$CFLAGS"

0 comments on commit 57731ae

Please sign in to comment.