Skip to content

Commit 343d9f3

Browse files
committed
Worked on tests and changes for CI tests
1 parent 907c44d commit 343d9f3

16 files changed

Lines changed: 525 additions & 313 deletions

.github/workflows/build_macos.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,3 @@ jobs:
4646
- name: Run tests
4747
run: |
4848
tests/runtests.sh -j4 VERBOSE=1
49-
build_pkgbuild:
50-
runs-on: ${{ matrix.os }}
51-
strategy:
52-
matrix:
53-
include:
54-
- os: macos-26
55-
compiler: 'clang'
56-
configure_options: '--disable-dependency-tracking --prefix=/usr/local --with-pyprefix'
57-
steps:
58-
- uses: actions/checkout@v6
59-
- name: Install build dependencies
60-
run: |
61-
brew update -q
62-
brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true
63-
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
64-
- name: Download test data
65-
run: |
66-
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
67-
- name: Build from source
68-
env:
69-
CC: ${{ matrix.compiler }}
70-
run: |
71-
./synclibs.sh --use-head
72-
./autogen.sh
73-
./configure ${{ matrix.configure_options }}
74-
make -j4 > /dev/null
75-
- name: Build pkg
76-
run: |
77-
tests/pkgbuild.sh
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Build packages from source.
2+
name: build_package
3+
on:
4+
pull_request:
5+
push:
6+
permissions: read-all
7+
jobs:
8+
build_dpkg:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
version: ['26.04']
13+
container:
14+
image: ubuntu:${{ matrix.version }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
- name: Set up container
18+
env:
19+
DEBIAN_FRONTEND: noninteractive
20+
run: |
21+
apt update -q
22+
apt install -y libterm-readline-gnu-perl locales software-properties-common
23+
locale-gen en_US.UTF-8
24+
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
25+
- name: Install build dependencies
26+
run: |
27+
apt update -q
28+
apt install -y autoconf automake autopoint autotools-dev build-essential debhelper dh-autoreconf dh-python fakeroot git libtool pkg-config
29+
- name: Download test data
30+
run: |
31+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
32+
- name: Build from source
33+
run: |
34+
./synclibs.sh --use-head
35+
./autogen.sh
36+
./configure ${{ matrix.configure_options }}
37+
make dist
38+
- name: Build dpkg
39+
run: |
40+
PACKAGE=`ls -1 *.tar.gz | head -n1`
41+
PACKAGE_ORIG=`echo "${PACKAGE%.tar.gz}.orig.tar.gz" | tr '-' '_'`
42+
mv "${PACKAGE}" "../${PACKAGE_ORIG}"
43+
cp -rf dpkg debian
44+
dpkg-buildpackage -rfakeroot
45+
build_rpm:
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
version: ['44']
50+
container:
51+
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
52+
steps:
53+
- uses: actions/checkout@v6
54+
- name: Set up container
55+
run: |
56+
dnf install -y dnf-plugins-core langpacks-en
57+
- name: Install build dependencies
58+
run: |
59+
dnf install -y @development-tools autoconf automake gettext-devel git libtool make pkg-config rpm-build
60+
- name: Download test data
61+
run: |
62+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
63+
- name: Build from source
64+
run: |
65+
./synclibs.sh --use-head
66+
./autogen.sh
67+
./configure ${{ matrix.configure_options }}
68+
make dist
69+
- name: Build rpm
70+
run: |
71+
PACKAGE=`ls -1 *.tar.gz | head -n1`
72+
rpmbuild -ta "${PACKAGE}"
73+
build_pkg:
74+
runs-on: ${{ matrix.os }}
75+
strategy:
76+
matrix:
77+
include:
78+
- os: macos-26
79+
configure_options: ''
80+
steps:
81+
- uses: actions/checkout@v6
82+
- name: Install build dependencies
83+
run: |
84+
brew update -q
85+
brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true
86+
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
87+
- name: Download test data
88+
run: |
89+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
90+
- name: Build from source
91+
run: |
92+
./synclibs.sh --use-head
93+
./autogen.sh
94+
./configure --disable-dependency-tracking --prefix=/usr/local --with-pyprefix ${{ matrix.configure_options }}
95+
make -j4 > /dev/null
96+
- name: Build pkg
97+
run: |
98+
tests/pkgbuild.sh

.github/workflows/build_windows.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ jobs:
1111
matrix:
1212
include:
1313
- os: windows-11-arm
14+
visual_studio_version: 2022
1415
- os: windows-2022
16+
visual_studio_version: 2022
17+
- os: windows-2025
18+
visual_studio_version: 2026
1519
steps:
1620
- uses: actions/checkout@v6
1721
- uses: actions/setup-python@v6
@@ -27,7 +31,7 @@ jobs:
2731
run: |
2832
.\synclibs.ps1 -UseHead
2933
.\autogen.ps1
30-
.\build.ps1 -VisualStudioVersion 2022 -Configuration Release -Platform x64 -PythonPath ${{ env.pythonLocation }} -VSToolsOptions "--extend-with-x64 --no-python-dll"
34+
.\build.ps1 -VisualStudioVersion ${{ matrix.visual_studio_version }} -Configuration Release -Platform x64 -PythonPath ${{ env.pythonLocation }} -VSToolsOptions "--extend-with-x64 --no-python-dll"
3135
- name: Run tests
3236
run: |
3337
.\runtests.ps1

.github/workflows/check_source.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
]
8787
}
8888
run: |
89-
npx @microsoft/sarif-multitool merge scan-results/*/*.sarif --merge-runs --output-file=scan-build-report.sarif
89+
npx @microsoft/sarif-multitool merge scan-results/*/*.sarif --output-file=scan-build-report.sarif
9090
NUMBER_OF_RESULTS=$( jq '.runs[0].results | length' scan-build-report.sarif )
9191
if [ $NUMBER_OF_RESULTS -eq 0 ]; then
9292
echo "$EMPTY_SARIF" > scan-build-report.sarif

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AC_PREREQ([2.71])
22

33
AC_INIT(
44
[libcdata],
5-
[20260612],
5+
[20260620],
66
[https://github.com/libyal/libcdata/issues])
77

88
AC_CONFIG_SRCDIR(

dpkg/compat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
13

dpkg/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Source: libcdata
22
Priority: extra
33
Maintainer: Joachim Metz <joachim.metz@gmail.com>
4-
Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config
4+
Build-Depends: debhelper (>= 13), dh-autoreconf, pkg-config
55
Standards-Version: 4.1.4
66
Section: libs
77
Homepage: https://github.com/libyal/libcdata

dpkg/rules

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ override_dh_auto_configure:
1313

1414
.PHONY: override_dh_install
1515
override_dh_install:
16-
dh_install --fail-missing -X.la
16+
dh_install -X.la
17+
18+
.PHONY: override_dh_missing
19+
override_dh_missing:
20+
dh_missing -X.la --fail-missing
1721

1822
.PHONY: override_dh_strip
1923
override_dh_strip:

dpkg/source/local-options

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
extend-diff-ignore = "(^|/)\.codecov\.yml$"
2+
extend-diff-ignore = "(^|/)\.github/.+$"
3+
extend-diff-ignore = "(^|/)[^/]+\.(ini|ps1|sh|yaml|yml)$"
4+
extend-diff-ignore = "(^|/).+/Makefile.in$"
5+
extend-diff-ignore = "(^|/)common/.+\.h$"
6+
extend-diff-ignore = "(^|/)dpkg/changelog$"
7+
extend-diff-ignore = "(^|/)dpkg/source/local-options$"
8+
extend-diff-ignore = "(^|/)documentation/.+$"
9+
extend-diff-ignore = "(^|/)include/lib.+\.h$"
10+
extend-diff-ignore = "(^|/)include/lib.+/.+\.h$"
11+
extend-diff-ignore = "(^|/)lib.+/lib.+_definitions\.h$"
12+
extend-diff-ignore = "(^|/)lib.+/lib.+\.rc$"
13+
extend-diff-ignore = "(^|/)po/Makevars$"
14+
extend-diff-ignore = "(^|/)po/Makevars\.template$"
15+
extend-diff-ignore = "(^|/)tests/.+\.(in|ps1|spec|sh|toml|py|at)$"
16+
extend-diff-ignore = "(^|/)tests/data/.+$"
17+
extend-diff-ignore = "(^|/)tests/input/.+$"
18+
extend-diff-ignore = "(^|/)tox\.ini$"

runtests.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Script that runs the tests
22
#
3-
# Version: 20260609
3+
# Version: 20260615
44

55
$ExitSuccess = 0
66
$ExitFailure = 1
@@ -34,17 +34,18 @@ Foreach (${Line} in ${Lines})
3434
Try
3535
{
3636
Invoke-Expression ${Line}
37+
$LastResult = $global:LastExitCode
3738
}
3839
Catch
3940
{
40-
$LastExitCode = ${ExitIgnore}
41+
$LastResult = ${ExitIgnore}
4142
}
42-
If (${LastExitCode} -eq ${ExitFailure})
43+
If (${LastResult} -eq ${ExitFailure})
4344
{
4445
$Result = ${ExitFailure}
4546
Write-Host "FAIL" -foreground Red -nonewline
4647
}
47-
ElseIf (${LastExitCode} -eq ${ExitIgnore})
48+
ElseIf (${LastResult} -eq ${ExitIgnore})
4849
{
4950
Write-Host "SKIP" -foreground Cyan -nonewline
5051
}

0 commit comments

Comments
 (0)