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 15, 2024
1 parent 8a91e0c commit 24d8138
Show file tree
Hide file tree
Showing 24 changed files with 109 additions and 106 deletions.
35 changes: 30 additions & 5 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
build_python_ubuntu:
runs-on: ubuntu-22.04
strategy:
Expand All @@ -46,7 +70,7 @@ jobs:
configure_options: '--enable-python'
python_version: ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo add-apt-repository universe &&
Expand Down Expand Up @@ -75,7 +99,7 @@ jobs:
configure_options: ''
python-version: '3.10'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand Down Expand Up @@ -105,7 +129,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 @@ -126,6 +150,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
2 changes: 1 addition & 1 deletion .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- python-version: '3.12'
toxenv: 'py312'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo add-apt-repository universe &&
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ stamp-h[1-9]
/tests/fwnt_test_security_descriptor
/tests/fwnt_test_security_identifier
/tests/fwnt_test_support
/tests/notify_stream.log
/tests/tmp*

# Local library dependencies specific files
Expand Down
23 changes: 9 additions & 14 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ EXTRA_DIST = \
$(SETUP_PY_FILES) \
$(SPEC_FILES)

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

pkgconfigdir = $(libdir)/pkgconfig

Expand All @@ -73,15 +80,3 @@ library:
(cd $(srcdir)/libfwnt && $(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 libfwnt.pc
-rm -f libfwnt.spec
@for dir in ${subdirs}; do \
(cd $$dir && $(MAKE) distclean) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"

8 changes: 6 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ environment:
CFLAGS: "--coverage -O0"
CPPFLAGS: "-DOPTIMIZATION_DISABLED"
LDFLAGS: "--coverage"
- TARGET: mingw-w64-gcc-python
BUILD_ENVIRONMENT: mingw-w64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
CONFIGURE_OPTIONS: "--enable-python"

install:
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
Expand All @@ -250,9 +254,9 @@ install:
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") {
(New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") }
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P gettext-devel -P wget -P python3-devel )
C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P gettext-devel -P python3-devel -P wget )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc )
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-python3 )
- ps: If ( ( "cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization" ).Contains( $env:TARGET ) ) {
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe }

Expand Down
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$(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(
[libfwnt],
[20240412],
[20240415],
[[email protected]])

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 = \
libfwnt/features.h.in \
libfwnt/types.h.in

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

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

14 changes: 6 additions & 8 deletions libfwnt/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 @@ -48,14 +48,12 @@ EXTRA_DIST = \
libfwnt.rc \
libfwnt.rc.in

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
libfwnt_definitions.h \
libfwnt.rc \
Makefile \
Makefile.in

distclean: clean
-rm -f libfwnt_definitions.h
-rm -f libfwnt.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/libcnotify.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcnotify required headers and functions
dnl
dnl Version: 20240314
dnl Version: 20240413

dnl Function to detect if libcnotify is available
dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -141,7 +141,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL],
dnl Headers included in libcnotify/libcnotify_stream.c
AC_CHECK_HEADERS([errno.h])
ac_cv_libcnotify_CPPFLAGS="-I../libcnotify";
ac_cv_libcnotify_CPPFLAGS="-I../libcnotify -I\$(top_srcdir)/libcnotify";
ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la";
ac_cv_libcnotify=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 = \
libfwnt.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 @@ -22,9 +22,7 @@ MSVSCPP_FILES = \
EXTRA_DIST = \
$(MSVSCPP_FILES)

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

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

bin_PROGRAMS = \
lznt1_fuzzer \
Expand Down Expand Up @@ -60,12 +60,10 @@ security_identifier_fuzzer_LDADD = \
../libfwnt/libfwnt.la
endif

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

splint-local:
@echo "Running splint on lznt1_fuzzer ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(lznt1_fuzzer_SOURCES)
Expand Down
10 changes: 4 additions & 6 deletions pyfwnt/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if HAVE_PYTHON
AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common \
-I../include -I$(top_srcdir)/include \
-I../common -I$(top_srcdir)/common \
@LIBCERROR_CPPFLAGS@ \
@LIBCDATA_CPPFLAGS@ \
@LIBFWNT_DLL_IMPORT@
Expand Down Expand Up @@ -36,9 +36,7 @@ pyfwnt_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS)

endif

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

Loading

0 comments on commit 24d8138

Please sign in to comment.