Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for github actions #142

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: C Project CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test:
name: Build and Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up dependencies
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
sudo apt-get update
sudo apt-get install -y build-essential
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
brew update
brew install gcc
fi

- name: Build project
run: |
./configure
make
make check
make install
1 change: 0 additions & 1 deletion Make-inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Dependencies to ensure libraries get rebuilt.
#
$(top_builddir)/src/libcommon/libcommon.la \
$(top_builddir)/src/libmissing/libmissing.la \
$(top_builddir)/src/libmunge/libmunge.la \
$(top_builddir)/src/libtap/libtap.la \
: force-dependency-check
Expand Down
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ EXTRA_DIST = \
build-aux/gen-version \
build-aux/tap-driver.sh \
doc \
portable/inet_ntop.h \
portable/strlcat.h \
portable/strlcpy.h \
$(TEMPLATE_FILES) \
# End of EXTRA_DIST

Expand Down Expand Up @@ -65,7 +68,6 @@ MAINTAINERCLEANFILES = \
src/Makefile.in \
src/etc/Makefile.in \
src/libcommon/Makefile.in \
src/libmissing/Makefile.in \
src/libmunge/Makefile.in \
src/munge/Makefile.in \
src/munged/Makefile.in \
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ AC_SUBST([DATE], m4_esyscmd([build-aux/gen-date]))

AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_LIBOBJ_DIR([portable])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/libmunge/munge.h])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
Expand All @@ -25,7 +26,7 @@ X_AC_WITH_LOGROTATEDDIR
X_AC_WITH_PKGCONFIGDIR
X_AC_HUMOR

AM_INIT_AUTOMAKE([1.12 foreign dist-xz no-dist-gzip])
AM_INIT_AUTOMAKE([1.12 foreign dist-xz no-dist-gzip subdir-objects])
AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
Expand Down Expand Up @@ -121,7 +122,6 @@ AC_CONFIG_FILES( \
src/common/Makefile \
src/etc/Makefile \
src/libcommon/Makefile \
src/libmissing/Makefile \
src/libmunge/Makefile \
src/libtap/Makefile \
src/munge/Makefile \
Expand Down
1 change: 1 addition & 0 deletions src/libmissing/URL → portable/README
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
strlcat & strlcpy source from:
ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/
File renamed without changes.
14 changes: 7 additions & 7 deletions src/libmissing/inet_ntop.h → portable/inet_ntop.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
*****************************************************************************/


#ifndef INET_NTOP_H
#define INET_NTOP_H
#ifndef MUNGE_INET_NTOP_H
#define MUNGE_INET_NTOP_H

#if HAVE_CONFIG_H
# include "config.h"
#include "config.h"
#endif /* HAVE_CONFIG_H */

#ifndef INET_ADDRSTRLEN
# define INET_ADDRSTRLEN 16
#define INET_ADDRSTRLEN 16
#endif /* !INET_ADDRSTRLEN */

#if HAVE_INET_NTOP
# include <arpa/inet.h>
#include <arpa/inet.h>
#else /* !HAVE_INET_NTOP */
# include <sys/socket.h>
#include <sys/socket.h>
const char *inet_ntop (int af, const void *src, char *dst, socklen_t cnt);
#endif /* !HAVE_INET_NTOP */

#endif /* !INET_NTOP_H */
#endif /* !MUNGE_INET_NTOP_H */
File renamed without changes.
11 changes: 9 additions & 2 deletions src/libmissing/strlcat.h → portable/strlcat.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#ifndef MUNGE_STRLCAT_H
#define MUNGE_STRLCAT_H

#if HAVE_CONFIG_H
# include "config.h"
#include "config.h"
#endif /* HAVE_CONFIG_H */

#if !HAVE_STRLCAT
#if HAVE_STRLCAT
#include <string.h>
#else /* !HAVE_STRLCAT */
size_t strlcat(char *dst, const char *src, size_t siz);
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
Expand All @@ -12,3 +17,5 @@ size_t strlcat(char *dst, const char *src, size_t siz);
* If retval >= siz, truncation occurred.
*/
#endif /* !HAVE_STRLCAT */

#endif /* !MUNGE_STRLCAT_H */
File renamed without changes.
11 changes: 9 additions & 2 deletions src/libmissing/strlcpy.h → portable/strlcpy.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#ifndef MUNGE_STRLCPY_H
#define MUNGE_STRLCPY_H

#if HAVE_CONFIG_H
# include "config.h"
#include "config.h"
#endif /* HAVE_CONFIG_H */

#if !HAVE_STRLCPY
#if HAVE_STRLCPY
#include <string.h>
#else /* !HAVE_STRLCPY */
size_t strlcpy(char *dst, const char *src, size_t siz);
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
#endif /* !HAVE_STRLCPY */

#endif /* !MUNGE_STRLCPY_H */
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ SUBDIRS = \
common \
etc \
libcommon \
libmissing \
libmunge \
libtap \
munge \
Expand Down
28 changes: 0 additions & 28 deletions src/libmissing/Makefile.am

This file was deleted.

37 changes: 0 additions & 37 deletions src/libmissing/missing.h

This file was deleted.

8 changes: 2 additions & 6 deletions src/munge/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ bin_PROGRAMS = \
munge_CPPFLAGS = \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/libcommon \
-I$(top_srcdir)/src/libmissing \
-I$(top_srcdir)/src/libmunge \
# End of munge_CPPFLAGS

munge_LDADD = \
$(top_builddir)/src/libcommon/libcommon.la \
$(top_builddir)/src/libmissing/libmissing.la \
$(top_builddir)/src/libmunge/libmunge.la \
# End of munge_LDADD

Expand All @@ -69,13 +67,11 @@ remunge_CPPFLAGS = \
-DWITH_PTHREADS \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/libcommon \
-I$(top_srcdir)/src/libmissing \
-I$(top_srcdir)/src/libmunge \
# End of remunge_CPPFLAGS

remunge_LDADD = \
$(top_builddir)/src/libcommon/libcommon.la \
$(top_builddir)/src/libmissing/libmissing.la \
$(top_builddir)/src/libmunge/libmunge.la \
$(LIBPTHREAD) \
# End of remunge_LDADD
Expand All @@ -93,15 +89,15 @@ remunge_SOURCES = \
# End of remunge_SOURCES

unmunge_CPPFLAGS = \
-I$(top_srcdir)/portable \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/libcommon \
-I$(top_srcdir)/src/libmissing \
-I$(top_srcdir)/src/libmunge \
# End of unmunge_CPPFLAGS

unmunge_LDADD = \
$(LIBOBJS) \
$(top_builddir)/src/libcommon/libcommon.la \
$(top_builddir)/src/libmissing/libmissing.la \
$(top_builddir)/src/libmunge/libmunge.la \
# End of unmunge_LDADD

Expand Down
2 changes: 1 addition & 1 deletion src/munge/unmunge.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
#include <unistd.h>
#include <munge.h>
#include "common.h"
#include "inet_ntop.h"
#include "license.h"
#include "log.h"
#include "missing.h" /* for inet_ntop() */
#include "read.h"
#include "version.h"
#include "xsignal.h"
Expand Down
4 changes: 2 additions & 2 deletions src/munged/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ munged_CPPFLAGS = \
-DRUNSTATEDIR='"$(runstatedir)"' \
-DSYSCONFDIR='"$(sysconfdir)"' \
-DWITH_PTHREADS \
-I$(top_srcdir)/portable \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/libcommon \
-I$(top_srcdir)/src/libmissing \
-I$(top_srcdir)/src/libmunge \
# End of munged_CPPFLAGS

munged_LDADD = \
$(LIBOBJS) \
$(top_builddir)/src/libcommon/libcommon.la \
$(top_builddir)/src/libmissing/libmissing.la \
$(top_builddir)/src/libmunge/libmunge.la \
$(LIBPTHREAD) \
$(LIBBZ2) \
Expand Down
3 changes: 1 addition & 2 deletions src/munged/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# include <config.h>
#endif /* HAVE_CONFIG_H */

#include <arpa/inet.h> /* for inet_ntop() */
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
Expand All @@ -45,11 +44,11 @@
#include <munge.h>
#include "clock.h"
#include "conf.h"
#include "inet_ntop.h"
#include "license.h"
#include "lock.h"
#include "log.h"
#include "md.h"
#include "missing.h" /* for inet_ntop() */
#include "munge_defs.h"
#include "net.h"
#include "path.h"
Expand Down
2 changes: 1 addition & 1 deletion src/munged/munged.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
#include "lock.h"
#include "log.h"
#include "md.h"
#include "missing.h"
#include "munge_defs.h"
#include "path.h"
#include "random.h"
#include "replay.h"
#include "str.h"
#include "strlcpy.h"
#include "timer.h"
#include "xsignal.h"

Expand Down
2 changes: 0 additions & 2 deletions src/mungekey/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ mungekey_CPPFLAGS = \
-DSYSCONFDIR='"$(sysconfdir)"' \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/libcommon \
-I$(top_srcdir)/src/libmissing \
-I$(top_srcdir)/src/libmunge \
# End of mungekey_CPPFLAGS

mungekey_LDADD = \
$(top_builddir)/src/libcommon/libcommon.la \
$(top_builddir)/src/libmissing/libmissing.la \
$(top_builddir)/src/libmunge/libmunge.la \
$(CRYPTO_LIBS) \
# End of mungekey_LDADD
Expand Down
1 change: 0 additions & 1 deletion src/mungekey/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "conf.h"
#include "license.h"
#include "log.h"
#include "missing.h"
#include "munge_defs.h"
#include "version.h"

Expand Down