Skip to content

Commit 3141833

Browse files
committed
Applied updates and changes for CI tests
1 parent c6dc01b commit 3141833

9 files changed

Lines changed: 120 additions & 126 deletions

File tree

.github/workflows/build_freebsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: build_freebsd
33
on: [push]
44
permissions: read-all
55
jobs:
6-
build_freebsd:
6+
build:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v6
Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Build from source.
2-
name: build
1+
# Build from source on Linux.
2+
name: build_linux
33
on: [push, pull_request]
44
permissions: read-all
55
jobs:
6-
build_ubuntu:
7-
runs-on: ubuntu-latest
6+
build:
7+
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
1010
include:
11-
- architecture: 'x86'
11+
- os: ubuntu-24.04
1212
compiler: 'clang'
1313
configure_options: ''
14-
- architecture: 'x64'
14+
- os: ubuntu-24.04-arm
1515
compiler: 'clang'
1616
configure_options: ''
17-
- architecture: 'x86'
17+
- os: ubuntu-24.04
1818
compiler: 'gcc'
1919
configure_options: ''
20-
- architecture: 'x64'
20+
- os: ubuntu-24.04-arm
2121
compiler: 'gcc'
2222
configure_options: ''
23-
- architecture: 'x64'
23+
- os: ubuntu-24.04
2424
compiler: 'gcc'
2525
configure_options: '--enable-wide-character-type'
2626
steps:
@@ -40,11 +40,11 @@ jobs:
4040
run: |
4141
tests/runtests.sh
4242
build_dist:
43-
runs-on: ubuntu-latest
43+
runs-on: ${{ matrix.os }}
4444
strategy:
4545
matrix:
4646
include:
47-
- architecture: 'x64'
47+
- os: ubuntu-24.04
4848
compiler: 'gcc'
4949
configure_options: ''
5050
steps:
@@ -63,15 +63,15 @@ jobs:
6363
- name: Run tests
6464
run: |
6565
make distcheck
66-
coverage_ubuntu:
67-
runs-on: ubuntu-latest
66+
build_shared:
67+
runs-on: ${{ matrix.os }}
6868
strategy:
6969
matrix:
7070
include:
71-
- architecture: 'x86'
71+
- os: ubuntu-24.04
7272
compiler: 'gcc'
73-
configure_options: '--enable-wide-character-type'
74-
- architecture: 'x64'
73+
configure_options: ''
74+
- os: ubuntu-24.04
7575
compiler: 'gcc'
7676
configure_options: '--enable-wide-character-type'
7777
steps:
@@ -82,6 +82,33 @@ jobs:
8282
- name: Download test data
8383
run: |
8484
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
85+
- name: Prepare shared libraries
86+
run: |
87+
tests/syncsharedlibs.sh --use-head
88+
- name: Building from source
89+
env:
90+
CC: ${{ matrix.compiler }}
91+
run: |
92+
tests/build.sh ${{ matrix.configure_options }}
93+
- name: Run tests
94+
run: |
95+
tests/runtests.sh
96+
coverage:
97+
runs-on: ${{ matrix.os }}
98+
strategy:
99+
matrix:
100+
include:
101+
- os: ubuntu-24.04
102+
compiler: 'gcc'
103+
configure_options: '--enable-wide-character-type'
104+
steps:
105+
- uses: actions/checkout@v6
106+
- name: Install build dependencies
107+
run: |
108+
sudo apt-get -y install curl autoconf automake autopoint build-essential git libtool pkg-config
109+
- name: Download test data
110+
run: |
111+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
85112
- name: Building from source
86113
env:
87114
CC: ${{ matrix.compiler }}
@@ -96,7 +123,7 @@ jobs:
96123
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
97124
done
98125
- name: Upload coverage report to Codecov
99-
uses: codecov/codecov-action@v5
126+
uses: codecov/codecov-action@v6
100127
with:
101-
name: linux-${{ matrix.architecture }}-gcc-no-optimization
128+
name: ${{ matrix.os }}-gcc-no-optimization
102129
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/build_macos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Build from source.
1+
# Build from source on Mac OS.
22
name: build_macos
33
on: [push, pull_request]
44
permissions: read-all
55
jobs:
6-
build_macos:
6+
build:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
@@ -12,10 +12,10 @@ jobs:
1212
configure_options: ''
1313
- os: macos-15
1414
configure_options: ''
15-
- os: macos-15-intel
16-
configure_options: ''
1715
- os: macos-26
1816
configure_options: ''
17+
- os: macos-26-intel
18+
configure_options: ''
1919
steps:
2020
- uses: actions/checkout@v6
2121
- name: Install build dependencies

.github/workflows/build_shared.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build from source on Windows.
2+
name: build_windows
3+
on: [push, pull_request]
4+
permissions: read-all
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
include:
11+
- os: windows-11-arm
12+
- os: windows-2022
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
16+
with:
17+
python-version: '3.12'
18+
- name: Install build dependencies
19+
run: |
20+
git clone https://github.com/libyal/vstools.git ..\vstools
21+
- name: Download test data
22+
run: |
23+
if (Test-Path .\synctestdata.ps1) { .\synctestdata.ps1 }
24+
- name: Building from source
25+
run: |
26+
.\synclibs.ps1 -UseHead
27+
.\autogen.ps1
28+
.\build.ps1 -VisualStudioVersion 2022 -Configuration Release -Platform x64 -PythonPath ${{ env.pythonLocation }} -VSToolsOptions "--extend-with-x64 --no-python-dll"
29+
- name: Run tests
30+
run: |
31+
.\runtests.ps1

appveyor.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,28 +120,32 @@ install:
120120
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then brew untap homebrew/homebrew-cask-versions && brew update -q; fi
121121
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi
122122
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") {
123-
(New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") }
123+
Invoke-WebRequest -Uri "https://cygwin.com/setup-x86_64.exe" -Outfile C:\cygwin64\setup-x86_64.exe }
124124
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
125-
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 )
125+
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 )
126+
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64" -And -Not (Test-Path ..\config.guess)) {
127+
Invoke-WebRequest -Uri "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" -Outfile ..\config.guess }
128+
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64" -And -Not (Test-Path ..\config.sub)) {
129+
Invoke-WebRequest -Uri "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" -Outfile ..\config.sub }
126130
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
127131
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc pkg-config )
128-
- ps: If ( ( "cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization" ).Contains( $env:TARGET ) ) {
129-
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe }
132+
- ps: If (("cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization").Contains($env:TARGET)) {
133+
Invoke-WebRequest -Uri "https://uploader.codecov.io/latest/windows/codecov.exe" -Outfile ..\codecov.exe }
130134

131135
build_script:
132136
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
133137
.\synclibs.ps1;
134138
.\autogen.ps1 }
135139
- ps: If ($env:TARGET -eq "vs2008") {
136140
.\build.ps1 -VisualStudioVersion 2008 -PythonPath $env:PYTHON_PATH -VSToolsOptions "--no-python-dll" }
137-
- ps: If ( ( "vs2010", "vs2012", "vs2013", "vs2015" ).Contains( $env:TARGET ) ) {
141+
- ps: If (("vs2010", "vs2012", "vs2013", "vs2015").Contains($env:TARGET)) {
138142
.\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" }
139-
- ps: If ( ( "vs2017", "vs2019", "vs2022", "vs2022-vsdebug", "vs2022-x64" ).Contains( $env:TARGET ) ) {
143+
- ps: If (("vs2017", "vs2019", "vs2022", "vs2022-vsdebug", "vs2022-x64").Contains($env:TARGET)) {
140144
.\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" }
141145
- 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
142146
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
143147
xcopy /i /q /s C:\projects\libcpath C:\cygwin64\home\appveyor\libcpath &&
144-
C:\cygwin64\bin\bash -e -l -c "cd libcpath && 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'" &&
148+
xcopy /i /q ..\config.* C:\cygwin64\home\appveyor\libcpath &&
145149
C:\cygwin64\bin\bash -e -l -c "cd libcpath && tests/build.sh ${CONFIGURE_OPTIONS}" )
146150
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
147151
xcopy /i /q /s C:\projects\libcpath C:\msys64\home\appveyor\libcpath &&

autogen.sh

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
#!/bin/sh
22
# Script to generate configure and Makefile using the autotools.
33
#
4-
# Version: 20241013
4+
# Version: 20260505
55

66
EXIT_SUCCESS=0;
77
EXIT_FAILURE=1;
88

99
BINDIR=`which aclocal`;
10-
BINDIR=`dirname ${BINDIR}`;
1110

12-
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/usr/bin";
11+
if test -x "${BINDIR}";
12+
then
13+
BINDIR=`dirname ${BINDIR}`;
14+
15+
elif test -x "/usr/bin/aclocal";
1316
then
1417
BINDIR="/usr/bin";
15-
fi
16-
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/usr/local/bin";
18+
19+
elif test -x "/usr/local/bin/aclocal";
1720
then
1821
BINDIR="/usr/local/bin";
19-
fi
20-
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/opt/local/bin";
22+
23+
# Try default location of MacPorts installed binaries.
24+
elif test -x "/opt/local/bin/aclocal";
2125
then
22-
# Default location of MacPorts installed binaries.
2326
BINDIR="/opt/local/bin";
24-
fi
25-
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/opt/homebrew/bin";
27+
28+
# Try default location of Homebrew installed binaries.
29+
elif test -x "/opt/homebrew/bin/aclocal";
2630
then
27-
# Default location of Homebrew installed binaries.
2831
BINDIR="/opt/homebrew/bin";
29-
fi
30-
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/mingw32/bin";
32+
33+
# Try default location of 32-bit MSYS2-MinGW installed binaries.
34+
elif test -x "/mingw32/bin/aclocal";
3135
then
32-
# Default location of 32-bit MSYS2-MinGW installed binaries.
3336
BINDIR="/mingw32/bin";
34-
fi
35-
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/mingw64/bin";
37+
38+
# Try default location of 64-bit MSYS2-MinGW installed binaries.
39+
elif test -x "/mingw64/bin/aclocal";
3640
then
37-
# Default location of 64-bit MSYS2-MinGW installed binaries.
3841
BINDIR="/mingw64/bin";
39-
fi
4042

41-
if ! test -x "${BINDIR}/aclocal";
42-
then
43+
else
4344
echo "Unable to find autotools";
4445

4546
exit ${EXIT_FAILURE};
@@ -56,9 +57,9 @@ PKGCONFIG="${BINDIR}/pkg-config";
5657

5758
if test "${OSTYPE}" = "msys";
5859
then
59-
# Work-around for autopoint failing to detect gettext version
60-
# using func_trace (which is not available) on MSYS by writing
61-
# the gettext version to intl/VERSION.
60+
# Work-around for autopoint failing to detect gettext version using
61+
# func_trace (which is not available) on MSYS by writing the gettext
62+
# version to intl/VERSION.
6263
if ! test -d intl;
6364
then
6465
mkdir intl;
@@ -71,8 +72,8 @@ elif ! test -x "${PKGCONFIG}";
7172
then
7273
if test "${BINDIR}" != "/usr/bin";
7374
then
74-
# On OpenBSD most of the autotools are located in
75-
# /usr/local/bin while pkg-config is located in /usr/bin
75+
# On OpenBSD most of the autotools are located in /usr/local/bin
76+
# while pkg-config is located in /usr/bin
7677
PKGCONFIG="/usr/bin/pkg-config";
7778
fi
7879
if ! test -x "${PKGCONFIG}";
@@ -163,7 +164,6 @@ else
163164
then
164165
exit $?;
165166
fi
166-
167167
fi
168168

169169
exit ${EXIT_SUCCESS};

configure.ac

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

33
AC_INIT(
44
[libcpath],
5-
[20260504],
5+
[20260509],
66
[joachim.metz@gmail.com])
77

88
AC_CONFIG_SRCDIR(
@@ -21,7 +21,6 @@ LT_INIT([win32-dll])
2121

2222
dnl Checks for programs
2323
AC_PROG_CC
24-
AC_PROG_GCC_TRADITIONAL
2524
AC_PROG_MAKE_SET
2625
AC_PROG_INSTALL
2726

0 commit comments

Comments
 (0)