Skip to content

Commit 672a48b

Browse files
committed
Worked on CI tests
1 parent ee581af commit 672a48b

21 files changed

+172
-87
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ name: build
33
on: [push, pull_request]
44
permissions: read-all
55
jobs:
6+
build_freebsd:
7+
# FreeBSD support is provided via virtualization on MacOS 12
8+
# See https://github.com/vmactions/freebsd-vm#under-the-hood.
9+
runs-on: macos-12
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Building from source
13+
id: build_freebsd
14+
uses: vmactions/freebsd-vm@v0
15+
with:
16+
usesh: true
17+
mem: 4096
18+
# Note that the test scripts require bash
19+
prepare: |
20+
pkg install -y autoconf automake bash fusefs-libs gettext git libtool pkgconf
21+
run: |
22+
tests/build.sh
23+
tests/runtests.sh
624
build_ubuntu:
725
runs-on: ubuntu-22.04
826
strategy:
@@ -30,7 +48,7 @@ jobs:
3048
compiler: 'gcc'
3149
configure_options: '--enable-static-executables=yes --enable-multi-threading-support=no'
3250
steps:
33-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
3452
- name: Install build dependencies
3553
run: |
3654
sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config zlib1g-dev
@@ -59,7 +77,7 @@ jobs:
5977
configure_options: '--enable-python3'
6078
python_version: '3'
6179
steps:
62-
- uses: actions/checkout@v2
80+
- uses: actions/checkout@v3
6381
- name: Install build dependencies
6482
run: |
6583
sudo add-apt-repository universe &&
@@ -88,7 +106,7 @@ jobs:
88106
configure_options: ''
89107
python-version: '3.10'
90108
steps:
91-
- uses: actions/checkout@v2
109+
- uses: actions/checkout@v3
92110
- name: Set up Python ${{ matrix.python-version }}
93111
uses: actions/setup-python@v1
94112
with:
@@ -118,7 +136,7 @@ jobs:
118136
compiler: 'gcc'
119137
configure_options: '--enable-wide-character-type'
120138
steps:
121-
- uses: actions/checkout@v2
139+
- uses: actions/checkout@v3
122140
- name: Install build dependencies
123141
run: |
124142
sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config zlib1g-dev
@@ -138,7 +156,7 @@ jobs:
138156
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
139157
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
140158
done
141-
- name: Upload coverage data
142-
run: |
143-
git clone https://github.com/codecov/codecov-bash.git ../codecov-bash
144-
/bin/bash ../codecov-bash/codecov -n linux-${{ matrix.architecture }}-gcc-no-optimization -X gcov;
159+
- name: Upload coverage report to Codecov
160+
uses: codecov/codecov-action@v3
161+
with:
162+
name: linux-${{ matrix.architecture }}-gcc-no-optimization

.github/workflows/build_shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
compiler: 'gcc'
1818
configure_options: '--enable-wide-character-type'
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- name: Install build dependencies
2222
run: |
2323
sudo apt-get -y install autoconf automake autopoint build-essential git libfuse-dev libtool pkg-config zlib1g-dev

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Files to ignore by git
22
#
3-
# Version: 20200912
3+
# Version: 20230405
44

55
# Generic auto-generated build files
66
*~
@@ -82,6 +82,7 @@ stamp-h[1-9]
8282
/m4/ltsugar.m4
8383
/m4/ltversion.m4
8484
/m4/nls.m4
85+
/m4/pkg.m4
8586
/m4/po.m4
8687
/m4/printf-posix.m4
8788
/m4/progtest.m4

acinclude.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl Checks for required headers and functions
22
dnl
3-
dnl Version: 20230220
3+
dnl Version: 20200713
44

55
dnl Function to detect if libvmdk dependencies are available
66
AC_DEFUN([AX_LIBVMDK_CHECK_LOCAL],

appveyor.yml

Lines changed: 79 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
environment:
22
nuget_token:
3-
secure: HYYxq3O5WWQ5cjS9AMu1OxtPtevYd1f8pglgXUCrb9uK8T6C+P8cUgfCpiX/Z2YJ
3+
secure: l8kGPdWSs3RTcW6B+mgcT8ByCdVvXx6HbWPNd8nnqoUDhku8g507tpxla7LUPDOM
44
PYPI_TOKEN:
55
secure: VHuZiUWgTqTciKE2nsv/LoLP8ouDmPjIMgnsuPtr8vWz0URFT4+aVTsCC6xyAD0q2VD/Uw09mz3r7eEfAKdZDSdswAwWiFqmXdQZfvvRZNg19Pi8iHBARXUOgYM7kCDeWBisgjR349kN6UhSIyq24nMukdtrum1RutN4ATNH9yxIPIEZ6ueIM4z3y7p0lwxGlY1m2CE7RpYqlgdqpS5BkOLhKILqeuHdv5T68d3k2fydAWW9T72BtSahdBsezBD9pWZgs0m5JV1MRnWX+S7ENA==
66
matrix:
@@ -10,40 +10,83 @@ environment:
1010
VisualStudioVersion: 9.0
1111
platform: Win32
1212
configuration: Release
13+
PYTHON_PATH: "C:\\Python37"
1314
- TARGET: vs2010
1415
BUILD_ENVIRONMENT: msbuild
1516
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
1617
VisualStudioVersion: 10.0
1718
platform: Win32
18-
configuration: VSDebug
19+
configuration: Release
20+
PYTHON_PATH: "C:\\Python37"
1921
- TARGET: vs2012
2022
BUILD_ENVIRONMENT: msbuild
2123
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
2224
VisualStudioVersion: 11.0
23-
platform: x64
25+
platform: Win32
2426
configuration: Release
27+
PYTHON_PATH: "C:\\Python37"
2528
- TARGET: vs2013
2629
BUILD_ENVIRONMENT: msbuild
2730
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
2831
VisualStudioVersion: 12.0
2932
platform: Win32
3033
configuration: Release
34+
PYTHON_PATH: "C:\\Python37"
3135
- TARGET: vs2015
3236
BUILD_ENVIRONMENT: msbuild
3337
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
3438
VisualStudioVersion: 14.0
3539
platform: Win32
3640
configuration: Release
41+
PYTHON_PATH: "C:\\Python38"
3742
- TARGET: vs2017
3843
BUILD_ENVIRONMENT: msbuild
3944
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
4045
VisualStudioVersion: 15.0
46+
platform: Win32
4147
configuration: Release
48+
PYTHON_PATH: "C:\\Python38"
4249
- TARGET: vs2019
4350
BUILD_ENVIRONMENT: msbuild
4451
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
4552
VisualStudioVersion: 16.0
53+
platform: Win32
54+
configuration: Release
55+
PYTHON_PATH: "C:\\Python311"
56+
- TARGET: vs2022
57+
BUILD_ENVIRONMENT: msbuild
58+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
59+
VisualStudioVersion: 17.0
60+
platform: Win32
4661
configuration: Release
62+
PYTHON_PATH: "C:\\Python311"
63+
- TARGET: vs2022-vsdebug
64+
BUILD_ENVIRONMENT: msbuild
65+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
66+
VisualStudioVersion: 17.0
67+
platform: Win32
68+
configuration: VSDebug
69+
PYTHON_PATH: "C:\\Python311"
70+
- TARGET: vs2022-x64
71+
BUILD_ENVIRONMENT: msbuild
72+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
73+
VisualStudioVersion: 17.0
74+
platform: x64
75+
configuration: Release
76+
PYTHON_PATH: "C:\\Python311"
77+
- TARGET: vs2022-python
78+
BUILD_ENVIRONMENT: msbuild
79+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
80+
VisualStudioVersion: 17.0
81+
platform: x64
82+
configuration: Release
83+
PYTHON_PATH: "C:\\Python311-x64"
84+
- TARGET: vs2022-nuget
85+
BUILD_ENVIRONMENT: msbuild
86+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
87+
VisualStudioVersion: 17.0
88+
configuration: Release
89+
PYTHON_PATH: "C:\\Python311"
4790
- TARGET: macos-x64-clang
4891
BUILD_ENVIRONMENT: xcode
4992
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
@@ -73,14 +116,14 @@ environment:
73116
CFLAGS: "-I/usr/local/include"
74117
LDFLAGS: "-L/usr/local/lib"
75118
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
76-
- TARGET: python310
119+
- TARGET: python311
77120
BUILD_ENVIRONMENT: python
78-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
79-
PYTHON: "C:\\Python310\\python.exe"
80-
- TARGET: python310-x64
121+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
122+
PYTHON: "C:\\Python311\\python.exe"
123+
- TARGET: python311-x64
81124
BUILD_ENVIRONMENT: python
82-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
83-
PYTHON: "C:\\Python310-x64\\python.exe"
125+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
126+
PYTHON: "C:\\Python311-x64\\python.exe"
84127
- TARGET: macos-tox-py37
85128
BUILD_ENVIRONMENT: python-tox
86129
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
@@ -152,16 +195,15 @@ environment:
152195
CONFIGURE_OPTIONS: "--enable-static-executables"
153196

154197
install:
155-
- cmd: git clone https://github.com/codecov/codecov-bash.git ..\codecov-bash
156198
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
157199
git clone https://github.com/libyal/vstools.git ..\vstools )
158200
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
159201
.\synczlib.ps1 }
160202
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
161-
If (($env:TARGET -eq "vs2017") -Or ($env:TARGET -eq "vs2019")) {
162-
.\syncdokan.ps1 }
163-
Else {
203+
If ( ( "vs2008", "vs2010", "vs2012", "vs2013", "vs2015" ).Contains( $env:TARGET ) ) {
164204
.\syncdokan.ps1 -UseLegacyVersion }
205+
Else {
206+
.\syncdokan.ps1 }
165207
}
166208
- cmd: if [%TARGET%]==[vs2010] (
167209
pushd ..\dokan &&
@@ -192,14 +234,14 @@ install:
192234
ren vs2015 msvscpp &&
193235
popd )
194236
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
195-
If (($env:TARGET -eq "vs2017") -Or ($env:TARGET -eq "vs2019")) {
237+
If ( ( "vs2008", "vs2010", "vs2012", "vs2013", "vs2015" ).Contains( $env:TARGET ) ) {
238+
.\builddokan.ps1 -UseLegacyVersion }
239+
Else {
196240
$Configuration = $env:CONFIGURATION;
197241
If (${Configuration} -eq "VSDebug") {
198242
$Configuration = "Debug" }
199243
.\builddokan.ps1 -Configuration ${Configuration} -Platform "Win32";
200244
.\builddokan.ps1 -Configuration ${Configuration} -Platform "x64"; }
201-
Else {
202-
.\builddokan.ps1 -UseLegacyVersion }
203245
}
204246
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update -q; fi
205247
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q gettext gnu-sed || true; fi
@@ -212,37 +254,35 @@ install:
212254
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 zlib-devel -P python3-devel )
213255
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
214256
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gcc gettext-devel libtool make msys/zlib-devel )
257+
- ps: If ( ( "cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization" ).Contains( $env:TARGET ) ) {
258+
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe }
215259

216260
build_script:
217261
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python" -and $isWindows)) {
218262
.\synclibs.ps1;
219263
.\autogen.ps1 }
220264
- ps: If ($env:TARGET -eq "vs2008") {
221-
.\build.ps1 -VisualStudioVersion 2008 -VSToolsOptions "" }
222-
- ps: If ($env:TARGET -eq "vs2010") {
223-
.\build.ps1 -VisualStudioVersion 2010 -VSToolsOptions "--no-python-dll" }
224-
- ps: If ($env:TARGET -eq "vs2012") {
225-
.\build.ps1 -VisualStudioVersion 2012 -VSToolsOptions "--extend-with-x64 --python-path C:\\Python27-x64" }
226-
- ps: If ($env:TARGET -eq "vs2013") {
227-
.\build.ps1 -VisualStudioVersion 2013 -VSToolsOptions "" }
228-
- ps: If ($env:TARGET -eq "vs2015") {
229-
.\build.ps1 -VisualStudioVersion 2015 -VSToolsOptions "" }
230-
- ps: If ($env:TARGET -eq "vs2017") {
231-
.\build.ps1 -VisualStudioVersion 2017 -Platform Win32 -VSToolsOptions "--extend-with-x64 --no-python-dll --with-dokany";
232-
.\build.ps1 -VisualStudioVersion 2017 -Platform x64 -VSToolsOptions "--extend-with-x64 --no-python-dll --with-dokany" }
233-
- cmd: if [%TARGET%]==[vs2017] (
265+
.\build.ps1 -VisualStudioVersion 2008 -PythonPath $env:PYTHON_PATH -VSToolsOptions "--no-python-dll" }
266+
- ps: If ( ( "vs2010", "vs2012", "vs2013", "vs2015" ).Contains( $env:TARGET ) ) {
267+
.\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform $env:PLATFORM -PythonPath $env:PYTHON_PATH -VSToolsOptions "--extend-with-x64 --no-python-dll" }
268+
- ps: If ( ( "vs2017", "vs2019", "vs2022", "vs2022-vsdebug", "vs2022-x64" ).Contains( $env:TARGET ) ) {
269+
.\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform $env:PLATFORM -PythonPath $env:PYTHON_PATH -VSToolsOptions "--extend-with-x64 --no-python-dll --with-dokany" }
270+
- ps: If ($env:TARGET -eq "vs2022-python") {
271+
.\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform $env:PLATFORM -PythonPath $env:PYTHON_PATH -VSToolsOptions "--extend-with-x64 --python-path $env:PYTHON_PATH --with-dokany" }
272+
- ps: If ($env:TARGET -eq "vs2022-nuget") {
273+
.\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform Win32 -PythonPath $env:PYTHON_PATH -VSToolsOptions "--extend-with-x64 --no-python-dll --with-dokany";
274+
.\build.ps1 -VisualStudioVersion $env:TARGET.Substring(2, 4) -Configuration $env:CONFIGURATION -Platform x64 -PythonPath $env:PYTHON_PATH -VSToolsOptions "--extend-with-x64 --no-python-dll --with-dokany" }
275+
- cmd: if [%TARGET%]==[vs2022-nuget] (
234276
move msvscpp vs2008 &&
235-
move vs2017 msvscpp &&
277+
move vs2022 msvscpp &&
236278
nuget pack libvmdk.nuspec )
237-
- ps: If ($env:TARGET -eq "vs2019") {
238-
.\build.ps1 -VisualStudioVersion 2019 -VSToolsOptions "--extend-with-x64 --no-python-dll --with-dokany" }
239279
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; tests/build.sh ${CONFIGURE_OPTIONS}; fi
240280
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
241281
"%PYTHON%" setup.py bdist_wheel )
242282
- sh: if 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 >/dev/null && tox -e${TOXENV}; fi
243283
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
244284
xcopy /i /q /s C:\projects\libvmdk C:\cygwin64\home\appveyor\libvmdk &&
245-
C:\cygwin64\bin\bash -e -l -c "cd libvmdk && wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" &&
285+
C:\cygwin64\bin\bash -e -l -c "cd libvmdk && 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'" &&
246286
C:\cygwin64\bin\bash -e -l -c "cd libvmdk && tests/build.sh ${CONFIGURE_OPTIONS}" )
247287
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
248288
xcopy /i /q /s C:\projects\libvmdk C:\msys64\home\appveyor\libvmdk &&
@@ -260,16 +300,19 @@ test_script:
260300
C:\msys64\usr\bin\bash -l -c "cd libvmdk && tests/runtests.sh" )
261301

262302
after_test:
303+
- cmd: if [%TARGET%]==[cygwin64-gcc-no-optimization] (
304+
C:\cygwin64\bin\bash -e -l -c "cd libvmdk && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
305+
C:\projects\codecov.exe -R \cygwin64\home\appveyor\libvmdk --name %TARGET% )
263306
- cmd: if [%TARGET%]==[mingw-w64-gcc-no-optimization] (
264-
copy C:\projects\codecov-bash\codecov C:\msys64\home\appveyor\libvmdk\codecov.sh &&
265-
C:\msys64\usr\bin\bash -e -l -c "cd libvmdk && chmod a+x ./codecov.sh && ./codecov.sh -n ${TARGET}" )
307+
C:\msys64\usr\bin\bash -e -l -c "cd libvmdk && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
308+
C:\projects\codecov.exe -R \msys64\home\appveyor\libvmdk --name %TARGET% )
266309

267310
artifacts:
268311
- path: \*.nupkg
269312
- path: dist\*.whl
270313

271314
deploy_script:
272-
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:TARGET -eq "vs2017") {
315+
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:TARGET -eq "vs2022-nuget") {
273316
Invoke-Expression "nuget push *.nupkg -NonInteractive -NoSymbols -Source https://api.nuget.org/v3/index.json -ApiKey ${env:NUGET_TOKEN}" }
274317
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:BUILD_ENVIRONMENT -eq "python") {
275318
Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" }

autogen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Script to generate ./configure using the autotools
33
#
4-
# Version: 20220709
4+
# Version: 20230405
55

66
EXIT_SUCCESS=0;
77
EXIT_FAILURE=1;
@@ -133,7 +133,7 @@ else
133133
exit $?;
134134
fi
135135

136-
${ACLOCAL} --force -I m4;
136+
${ACLOCAL} --force --install -I m4;
137137
if test $? -ne 0;
138138
then
139139
exit $?;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy