Skip to content

Commit

Permalink
Changes for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed May 8, 2024
1 parent 05b30db commit e6bebcb
Show file tree
Hide file tree
Showing 41 changed files with 582 additions and 403 deletions.
91 changes: 82 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,82 @@ jobs:
compiler: 'gcc'
configure_options: '--enable-static-executables=yes --enable-multi-threading-support=no'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libtool pkg-config
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex 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: |
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 byacc flex 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_fuse_ubuntu:
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 byacc flex git libtool pkg-config libfuse-dev
- 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: |
tests/runtests.sh
build_fuse3_ubuntu:
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 byacc flex git libtool pkg-config libfuse3-dev
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -52,12 +124,12 @@ 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 &&
sudo apt-get update &&
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libtool pkg-config python3-dev python-dev-is-python3
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -81,7 +153,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 All @@ -90,7 +162,7 @@ jobs:
run: |
sudo add-apt-repository universe &&
sudo apt-get update &&
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libtool pkg-config python3-dev python-dev-is-python3
- name: Building from source
env:
CC: ${{ matrix.compiler }}
Expand All @@ -111,10 +183,10 @@ jobs:
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libtool pkg-config
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libtool pkg-config
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -132,6 +204,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
4 changes: 2 additions & 2 deletions .github/workflows/build_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libtool pkg-config
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libtool pkg-config
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
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 @@ -137,6 +137,7 @@ stamp-h[1-9]
/phditools/phdimount
/tests/*.exe
/tests/input
/tests/notify_stream.log
/tests/phdi_test_block_descriptor
/tests/phdi_test_block_tree
/tests/phdi_test_block_tree_node
Expand Down
26 changes: 10 additions & 16 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,22 @@ EXTRA_DIST = \
$(SETUP_PY_FILES) \
$(SPEC_FILES)

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

pkgconfigdir = $(libdir)/pkgconfig

pkgconfig_DATA = \
libphdi.pc

libtool:
@LIBTOOL_DEPS@
libtool: @LIBTOOL_DEPS@
cd $(srcdir) && $(SHELL) ./config.status --recheck

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

14 changes: 11 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ environment:
- TARGET: cygwin64-gcc-static-executables
BUILD_ENVIRONMENT: cygwin64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
CONFIGURE_OPTIONS: "--enable-static-executables"
CONFIGURE_OPTIONS: "--enable-static-executables --with-libfuse=no"
- TARGET: mingw-w64-gcc
BUILD_ENVIRONMENT: mingw-w64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
Expand All @@ -241,11 +241,19 @@ 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"
- TARGET: mingw-w64-gcc-static-executables
BUILD_ENVIRONMENT: mingw-w64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
CONFIGURE_OPTIONS: "--enable-static-executables"

matrix:
allow_failures:
- TARGET: mingw-w64-gcc-python

install:
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
git clone https://github.com/libyal/vstools.git ..\vstools )
Expand Down Expand Up @@ -304,9 +312,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 bison -P flex -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 bison -P cygfuse -P flex -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 msys/bison msys/flex )
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc msys/bison msys/flex 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(
[libphdi],
[20240307],
[20240508],
[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 @@ -15,13 +15,11 @@ EXTRA_DIST = \
libphdi/features.h.in \
libphdi/types.h.in

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

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

22 changes: 10 additions & 12 deletions libphdi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ AM_YFLAGS = -d -v -l -p libphdi_xml_scanner_

AM_CPPFLAGS = \
-DLOCALEDIR=\"$(datadir)/locale\" \
-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 @@ -107,18 +107,16 @@ EXTRA_DIST = \
libphdi.rc \
libphdi.rc.in

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
libphdi_definitions.h \
libphdi.rc \
libphdi_xml_parser.c \
libphdi_xml_parser.h \
libphdi_xml_parser.output \
libphdi_xml_scanner.c \
Makefile \
Makefile.in

distclean: clean
-rm -f libphdi_definitions.h
-rm -f libphdi.rc
-rm -f libphdi_xml_parser.c
-rm -f libphdi_xml_parser.h
-rm -f libphdi_xml_parser.output
-rm -f libphdi_xml_scanner.c
-rm -f Makefile

sources-local: $(BUILT_SOURCES)

splint-local:
Expand Down
6 changes: 3 additions & 3 deletions m4/common.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for common headers and functions
dnl
dnl Version: 20181117
dnl Version: 20240308

dnl Function to test if a certain feature was disabled
AC_DEFUN([AX_COMMON_ARG_DISABLE],
Expand All @@ -26,7 +26,7 @@ AC_DEFUN([AX_COMMON_ARG_ENABLE],
[$1],
[AS_HELP_STRING(
[--enable-$1],
[$3 [default=$4]])],
[$3 @<:@default=$4@:>@])],
[ac_cv_enable_$2=$enableval],
[ac_cv_enable_$2=$4])dnl
Expand All @@ -43,7 +43,7 @@ AC_DEFUN([AX_COMMON_ARG_WITH],
[$1],
[AS_HELP_STRING(
[--with-$1[[=$5]]],
[$3 [default=$4]])],
[$3 @<:@default=$4@:>@])],
[ac_cv_with_$2=$withval],
[ac_cv_with_$2=$4])dnl
Expand Down
Loading

0 comments on commit e6bebcb

Please sign in to comment.