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 11, 2024
1 parent 5682863 commit 3243929
Show file tree
Hide file tree
Showing 45 changed files with 258 additions and 195 deletions.
91 changes: 82 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,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 libssl-dev libtool pkg-config zlib1g-dev
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-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_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 libssl-dev libtool pkg-config zlib1g-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: |
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 libssl-dev libtool pkg-config zlib1g-dev 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 libssl-dev libtool pkg-config zlib1g-dev libfuse3-dev
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -64,12 +136,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 libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -93,7 +165,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 @@ -102,7 +174,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 libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3
- name: Building from source
env:
CC: ${{ matrix.compiler }}
Expand All @@ -123,10 +195,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 libssl-dev libtool pkg-config zlib1g-dev
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -144,6 +216,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 libssl-dev libtool pkg-config zlib1g-dev
sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev
- 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 @@ -186,6 +186,7 @@ stamp-h[1-9]
/tests/input_raw
/tests/input_raw_more
/tests/input_raw_optical
/tests/notify_stream.log
/tests/tmp*

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

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

pkgconfigdir = $(libdir)/pkgconfig

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

41 changes: 26 additions & 15 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
matrix:
- TARGET: vs2008
BUILD_ENVIRONMENT: msbuild
Expand Down Expand Up @@ -235,7 +235,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 @@ -247,11 +247,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 @@ -312,9 +320,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 zlib-devel -P libssl-devel -P python3-devel -P libuuid-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 libssl-devel -P libuuid-devel -P python3-devel -P wget -P zlib-devel )
- 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 msys/zlib-devel )
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc msys/bison msys/flex msys/zlib-devel 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 Expand Up @@ -343,12 +351,12 @@ build_script:
- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi
- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV} && tox -eauditwheel -- --plat ${AUDITWHEEL_PLAT} dist/*.whl && rm -f dist/*.whl && mv wheelhouse/*.whl dist/; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
xcopy /i /q /s C:\projects\libewf-legacy C:\cygwin64\home\appveyor\libewf-legacy &&
C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" &&
C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && tests/build.sh ${CONFIGURE_OPTIONS}" )
xcopy /i /q /s C:\projects\libewf C:\cygwin64\home\appveyor\libewf &&
C:\cygwin64\bin\bash -e -l -c "cd libewf && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" &&
C:\cygwin64\bin\bash -e -l -c "cd libewf && tests/build.sh ${CONFIGURE_OPTIONS}" )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
xcopy /i /q /s C:\projects\libewf-legacy C:\msys64\home\appveyor\libewf-legacy &&
C:\msys64\usr\bin\bash -e -l -c "cd libewf-legacy && tests/build.sh ${CONFIGURE_OPTIONS}" )
xcopy /i /q /s C:\projects\libewf C:\msys64\home\appveyor\libewf &&
C:\msys64\usr\bin\bash -e -l -c "cd libewf && tests/build.sh ${CONFIGURE_OPTIONS}" )

test_script:
- cmd: rem Run tests
Expand All @@ -357,17 +365,17 @@ test_script:
- sh: if test ${BUILD_ENVIRONMENT} = "xcode" && test ${TARGET} != "macos-pkgbuild"; then tests/runtests.sh; fi
- sh: if test ${TARGET} = "macos-pkgbuild"; then tests/pkgbuild.sh; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
C:\cygwin64\bin\bash -l -c "cd libewf-legacy && tests/runtests.sh" )
C:\cygwin64\bin\bash -l -c "cd libewf && tests/runtests.sh" )
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
C:\msys64\usr\bin\bash -l -c "cd libewf-legacy && tests/runtests.sh" )
C:\msys64\usr\bin\bash -l -c "cd libewf && tests/runtests.sh" )

after_test:
- cmd: if [%TARGET%]==[cygwin64-gcc-no-optimization] (
C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
C:\projects\codecov.exe -R \cygwin64\home\appveyor\libewf-legacy --name %TARGET% )
C:\cygwin64\bin\bash -e -l -c "cd libewf && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
C:\projects\codecov.exe -R \cygwin64\home\appveyor\libewf --name %TARGET% )
- cmd: if [%TARGET%]==[mingw-w64-gcc-no-optimization] (
C:\msys64\usr\bin\bash -e -l -c "cd libewf-legacy && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
C:\projects\codecov.exe -R \msys64\home\appveyor\libewf-legacy --name %TARGET% )
C:\msys64\usr\bin\bash -e -l -c "cd libewf && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
C:\projects\codecov.exe -R \msys64\home\appveyor\libewf --name %TARGET% )

artifacts:
- path: \*.nupkg
Expand All @@ -376,4 +384,7 @@ artifacts:
deploy_script:
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:TARGET -eq "vs2022-nuget") {
Invoke-Expression "nuget push *.nupkg -NonInteractive -NoSymbols -Source https://api.nuget.org/v3/index.json -ApiKey ${env:NUGET_TOKEN}" }
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:BUILD_ENVIRONMENT -eq "python-tox") {
Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" }
- sh: if test ${APPVEYOR_REPO_TAG} = "true" && test ${BUILD_ENVIRONMENT} = "python-tox"; then twine upload dist/*.whl --username __token__ --password ${PYPI_TOKEN} --skip-existing; fi

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(
[libewf],
[20140816],
[20140817],
[[email protected]])

AC_CONFIG_SRCDIR(
Expand Down
6 changes: 2 additions & 4 deletions documents/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ EXTRA_DIST = \
header2.txt \
programming.txt

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

6 changes: 2 additions & 4 deletions ewf.net/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ EXTRA_DIST = \
ewf.net.rc \
ewf.net.rc.in

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

10 changes: 4 additions & 6 deletions ewftools-mt/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if HAVE_CXX11
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@ \
@LIBCDATETIME_CPPFLAGS@ \
Expand Down Expand Up @@ -77,12 +77,10 @@ ewfacquirestream_LDADD = \
-lstdc++
endif

MAINTAINERCLEANFILES = \
DISTCLEANFILES = \
Makefile \
Makefile.in

distclean: clean
-rm -f Makefile

splint-local:
@echo "Running splint on ewfacquirestream ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(ewfacquirestream_SOURCES)
Expand Down
Loading

0 comments on commit 3243929

Please sign in to comment.