Skip to content

Commit

Permalink
Changes for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Apr 14, 2024
1 parent 3151f18 commit 4a4743a
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 80 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
compiler: 'gcc'
configure_options: ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config
Expand All @@ -36,6 +36,30 @@ jobs:
- name: Run tests
run: |
tests/runtests.sh
build_dist:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- architecture: 'x64'
compiler: 'gcc'
configure_options: ''
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
- name: Building from source
env:
CC: ${{ matrix.compiler }}
run: |
tests/build.sh ${{ matrix.configure_options }}
- name: Run tests
run: |
make distcheck
coverage_ubuntu:
runs-on: ubuntu-22.04
strategy:
Expand All @@ -48,7 +72,7 @@ jobs:
compiler: 'gcc'
configure_options: ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config
Expand All @@ -69,6 +93,7 @@ jobs:
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
done
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
name: linux-${{ matrix.architecture }}-gcc-no-optimization
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/build_freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build_freebsd:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Building from source
id: build_freebsd
uses: vmactions/freebsd-vm@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
compiler: 'gcc'
configure_options: ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config
Expand Down
23 changes: 9 additions & 14 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ EXTRA_DIST = \
$(PKGCONFIG_FILES) \
$(SPEC_FILES)

MAINTAINERCLEANFILES = \
Makefile.in
DISTCLEANFILES = \
config.status \
config.cache \
config.log \
libfcache.pc \
libfcache.spec \
Makefile \
Makefile.in \
po/Makevars

pkgconfigdir = $(libdir)/pkgconfig

Expand All @@ -61,15 +68,3 @@ library:
(cd $(srcdir)/libfcache && $(MAKE) $(AM_MAKEFLAGS))
(cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))

distclean: clean
-rm -f Makefile
-rm -f config.status
-rm -f config.cache
-rm -f config.log
-rm -f libfcache.pc
-rm -f libfcache.spec
@for dir in ${subdirs}; do \
(cd $$dir && $(MAKE) distclean) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"

13 changes: 6 additions & 7 deletions common/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS = \
-I../include -I../include -I$(top_srcdir)/include

EXTRA_DIST = \
byte_stream.h \
Expand All @@ -15,11 +16,9 @@ EXTRA_DIST = \
types.h.in \
wide_string.h

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
config.h \
types.h \
Makefile \
Makefile.in

distclean: clean
-rm -f config.h
-rm -f types.h
-rm -f Makefile

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libfcache],
[20240329],
[20240414],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
14 changes: 6 additions & 8 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ EXTRA_DIST = \
libfcache/features.h.in \
libfcache/types.h.in

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
libfcache.h \
libfcache/definitions.h \
libfcache/features.h \
libfcache/types.h \
Makefile \
Makefile.in

distclean: clean
-rm -f libfcache.h
-rm -f libfcache/definitions.h
-rm -f libfcache/features.h
-rm -f libfcache/types.h
-rm -f Makefile

14 changes: 6 additions & 8 deletions libfcache/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common \
-I../include -I$(top_srcdir)/include \
-I../common -I$(top_srcdir)/common \
@LIBCERROR_CPPFLAGS@ \
@LIBCTHREADS_CPPFLAGS@ \
@LIBCDATA_CPPFLAGS@ \
Expand Down Expand Up @@ -36,14 +36,12 @@ EXTRA_DIST = \
libfcache.rc \
libfcache.rc.in

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
libfcache_definitions.h \
libfcache.rc \
Makefile \
Makefile.in

distclean: clean
-rm -f libfcache_definitions.h
-rm -f libfcache.rc
-rm -f Makefile

sources-local: $(BUILT_SOURCES)

splint-local:
Expand Down
4 changes: 2 additions & 2 deletions m4/libcdata.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcdata required headers and functions
dnl
dnl Version: 20240314
dnl Version: 20240413

dnl Function to detect if libcdata is available
dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -531,7 +531,7 @@ dnl Function to detect if libcdata dependencies are available
AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL],
[dnl No additional checks.
ac_cv_libcdata_CPPFLAGS="-I../libcdata";
ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata";
ac_cv_libcdata_LIBADD="../libcdata/libcdata.la";
ac_cv_libcdata=local
Expand Down
4 changes: 2 additions & 2 deletions m4/libcerror.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcerror required headers and functions
dnl
dnl Version: 20240314
dnl Version: 20240413

dnl Function to detect if libcerror is available
dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -169,7 +169,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL],
])
])
ac_cv_libcerror_CPPFLAGS="-I../libcerror";
ac_cv_libcerror_CPPFLAGS="-I../libcerror -I\$(top_srcdir)/libcerror";
ac_cv_libcerror_LIBADD="../libcerror/libcerror.la";
ac_cv_libcerror=local
Expand Down
4 changes: 2 additions & 2 deletions m4/libcthreads.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcthreads required headers and functions
dnl
dnl Version: 20240314
dnl Version: 20240413

dnl Function to detect if libcthreads is available
dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -292,7 +292,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL],
AS_IF(
[test "x$ac_cv_libcthreads_multi_threading" != xno],
[ac_cv_libcthreads_CPPFLAGS="-I../libcthreads";
[ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads";
ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la";
ac_cv_libcthreads=local],
Expand Down
6 changes: 2 additions & 4 deletions manuals/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ man_MANS = \
EXTRA_DIST = \
libfcache.3

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

6 changes: 2 additions & 4 deletions msvscpp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ MSVSCPP_FILES = \
EXTRA_DIST = \
$(MSVSCPP_FILES)

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

11 changes: 6 additions & 5 deletions synclibs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# Script that synchronizes the local library dependencies
#
# Version: 20231023
# Version: 20240414

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -95,10 +95,11 @@ endif
d
}
/distclean: clean/ {
/DISTCLEANFILES = / {
n
N
d
/${LOCAL_LIB}_definitions.h/ {
d
}
}";
echo "${SED_SCRIPT}" >> ${LOCAL_LIB}-$$.sed;
sed -i'~' -f ${LOCAL_LIB}-$$.sed ${LOCAL_LIB_MAKEFILE_AM};
Expand Down Expand Up @@ -140,7 +141,7 @@ SED_SCRIPT="/^$/ {
then
if ! test -f "m4/libuna.m4";
then
sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM};
sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I../libuna -I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM};
fi
fi

Expand Down
10 changes: 4 additions & 6 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common \
-I../include -I$(top_srcdir)/include \
-I../common -I$(top_srcdir)/common \
@LIBCERROR_CPPFLAGS@ \
@LIBCTHREADS_CPPFLAGS@ \
@LIBCDATA_CPPFLAGS@ \
Expand Down Expand Up @@ -78,9 +78,7 @@ fcache_test_support_SOURCES = \
fcache_test_support_LDADD = \
../libfcache/libfcache.la

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

9 changes: 3 additions & 6 deletions tests/test_library.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Tests library functions and types.
#
# Version: 20231007
# Version: 20240413

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -141,12 +141,9 @@ then
exit ${EXIT_IGNORE};
fi

TEST_RUNNER="tests/test_runner.sh";
TEST_DIRECTORY=`dirname $0`;

if ! test -f "${TEST_RUNNER}";
then
TEST_RUNNER="./test_runner.sh";
fi
TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh";

if ! test -f "${TEST_RUNNER}";
then
Expand Down
9 changes: 3 additions & 6 deletions tests/test_manpage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Tests man pages.
#
# Version: 20230410
# Version: 20240413

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -45,12 +45,9 @@ then
exit ${EXIT_IGNORE};
fi

TEST_RUNNER="tests/test_runner.sh";
TEST_DIRECTORY=`dirname $0`;

if ! test -f "${TEST_RUNNER}";
then
TEST_RUNNER="./test_runner.sh";
fi
TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh";

if ! test -f "${TEST_RUNNER}";
then
Expand Down

0 comments on commit 4a4743a

Please sign in to comment.