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 19, 2024
1 parent 489f480 commit 6c867ca
Show file tree
Hide file tree
Showing 42 changed files with 585 additions and 421 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 git libfuse-dev libtool pkg-config
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: |
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_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 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 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 git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential 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 git libfuse-dev libtool pkg-config python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential 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 git libfuse-dev libtool pkg-config
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
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 git libfuse-dev libtool pkg-config
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
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 @@ -151,6 +151,7 @@ stamp-h[1-9]
/tests/creg_test_value
/tests/creg_test_value_entry
/tests/input
/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 @@ -61,8 +61,15 @@ EXTRA_DIST = \
$(SETUP_PY_FILES) \
$(SPEC_FILES)

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

pkgconfigdir = $(libdir)/pkgconfig

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

12 changes: 8 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
environment:
nuget_token:
secure: l8kGPdWSs3RTcW6B+mgcT8ByCdVvXx6HbWPNd8nnqoUDhku8g507tpxla7LUPDOM
secure: xFlOodfYttki8HxA1hdhVhQ2lkVbj1EA1FxP9T1il2MUsBfH1rPEbTZy+etaMTD8
PYPI_TOKEN:
secure: VHuZiUWgTqTciKE2nsv/Lm6aKQU/ci3QClu+/jWvxtmkaYoz1JQfc7MbYFTIwQpe6DmCh0rl/iG6HlNKwo9yOS2+l/V45Ger3WeV0S0C1ZrftR5BVd1MLXfMs+MM6wn808uKhhWIhZWhcl2PtO6TLreuBzZmLHmjXwBRStGnUpmkGhyhzlZJss4sna11EzW7hZUbn2JA2GsSO1qNDYrvIjaqQZ5v4tu1DfNUi6OBTwm5nQ1YRvnQ2NU4eBV4r/aRRP23s4HqtKGLrJUQq+lAVQ==
matrix:
Expand Down Expand Up @@ -249,6 +249,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"
- TARGET: mingw-w64-gcc-static-executables
BUILD_ENVIRONMENT: mingw-w64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
Expand Down Expand Up @@ -306,13 +310,13 @@ install:
- cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] (
"%PYTHON%" -m pip install -U tox twine )
- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential flex git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi
- 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 cygfuse -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
45 changes: 24 additions & 21 deletions autogen.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script to generate the necessary files for a msvscpp build
#
# Version: 20230118
# Version: 20240306

$WinFlex = "..\win_flex_bison\win_flex.exe"
$WinBison = "..\win_flex_bison\win_bison.exe"
Expand Down Expand Up @@ -29,33 +29,36 @@ If (Test-Path "${Prefix}.net")

$NamePrefix = ""

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
ForEach (${Library} in Get-ChildItem -Directory -Path "lib*")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"

$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"
$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"

Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"
Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}

# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}
# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"

Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"
Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
}
}

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(
[libcreg],
[20240303],
[20240419],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
10 changes: 4 additions & 6 deletions cregtools/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@ \
@LIBCDATA_CPPFLAGS@ \
@LIBCLOCALE_CPPFLAGS@ \
Expand Down Expand Up @@ -104,12 +104,10 @@ cregmount_LDADD = \
@LIBCERROR_LIBADD@ \
@LIBINTL@

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

splint-local:
@echo "Running splint on cregexport ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(cregexport_SOURCES)
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 = \
libcreg/features.h.in \
libcreg/types.h.in

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

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

0 comments on commit 6c867ca

Please sign in to comment.