Skip to content

Commit 86facf8

Browse files
committed
Applied updates and changes for CI tests
1 parent 27a5211 commit 86facf8

13 files changed

Lines changed: 244 additions & 376 deletions

File tree

.github/workflows/build_freebsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v6
10-
- name: Building from source
10+
- name: Build from source
1111
id: build_freebsd
1212
uses: vmactions/freebsd-vm@v1
1313
with:

.github/workflows/build_linux.yml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Download test data
3434
run: |
3535
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
36-
- name: Building from source
36+
- name: Build from source
3737
env:
3838
CC: ${{ matrix.compiler }}
3939
run: |
@@ -57,7 +57,7 @@ jobs:
5757
- name: Download test data
5858
run: |
5959
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
60-
- name: Building from source
60+
- name: Build from source
6161
env:
6262
CC: ${{ matrix.compiler }}
6363
run: |
@@ -84,45 +84,11 @@ jobs:
8484
- name: Prepare shared libraries
8585
run: |
8686
tests/syncsharedlibs.sh --use-head
87-
- name: Building from source
87+
- name: Build from source
8888
env:
8989
CC: ${{ matrix.compiler }}
9090
run: |
9191
tests/build.sh ${{ matrix.configure_options }}
9292
- name: Run tests
9393
run: |
9494
tests/runtests.sh
95-
coverage:
96-
runs-on: ${{ matrix.os }}
97-
strategy:
98-
matrix:
99-
include:
100-
- os: ubuntu-24.04
101-
compiler: 'gcc'
102-
configure_options: 'CPPFLAGS=-DHAVE_MEMORY_TESTS=1 --enable-code-coverage'
103-
steps:
104-
- uses: actions/checkout@v6
105-
- name: Install build dependencies
106-
run: |
107-
sudo apt -y install curl autoconf automake autopoint build-essential git libtool pkg-config
108-
- name: Download test data
109-
run: |
110-
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
111-
- name: Building from source
112-
env:
113-
CC: ${{ matrix.compiler }}
114-
run: |
115-
tests/build.sh ${{ matrix.configure_options }}
116-
- name: Run tests
117-
run: |
118-
make check CHECK_WITH_STDERR=1 SKIP_TOOLS_END_TO_END_TESTS=1
119-
- name: Generate coverage data
120-
run: |
121-
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
122-
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
123-
done
124-
- name: Upload coverage report to Codecov
125-
uses: codecov/codecov-action@v6
126-
with:
127-
name: ${{ matrix.os }}-gcc-no-optimization
128-
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/build_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Download test data
2929
run: |
3030
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
31-
- name: Building from source
31+
- name: Build from source
3232
run: |
3333
tests/build.sh ${{ matrix.configure_options }}
3434
- name: Run tests

.github/workflows/build_windows.yml

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,70 @@ jobs:
2323
- name: Download test data
2424
run: |
2525
if (Test-Path .\synctestdata.ps1) { .\synctestdata.ps1 }
26-
- name: Building from source
26+
- name: Build from source
2727
run: |
2828
.\synclibs.ps1 -UseHead
2929
.\autogen.ps1
3030
.\build.ps1 -VisualStudioVersion 2022 -Configuration Release -Platform x64 -PythonPath ${{ env.pythonLocation }} -VSToolsOptions "--extend-with-x64 --no-python-dll"
3131
- name: Run tests
3232
run: |
3333
.\runtests.ps1
34+
build_cygwin:
35+
runs-on: windows-latest
36+
strategy:
37+
matrix:
38+
include:
39+
- configure_options: '--enable-winapi=no'
40+
- configure_options: '--enable-winapi=yes'
41+
steps:
42+
- name: Configure git
43+
run: git config --global core.autocrlf false
44+
- uses: actions/checkout@v6
45+
- name: Install Cygwin and build dependencies
46+
uses: cygwin/cygwin-install-action@v6
47+
with:
48+
packages: autoconf, automake, gettext-devel, git, libtool, make, mingw-w64-x86_64-gcc, pkg-config
49+
platform: x86_64
50+
add-to-path: true
51+
- name: Build from source
52+
shell: bash --login -e -o pipefail -o igncr {0}
53+
working-directory: ${{ github.workspace }}
54+
env:
55+
CHERE_INVOKING: 1
56+
CONFIGURE_OPTIONS: ${{ matrix.configure_options }}
57+
LD: ld
58+
run: |
59+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
60+
tests/build.sh ${CONFIGURE_OPTIONS}
61+
- name: Run tests
62+
shell: bash --login -e -o pipefail -o igncr {0}
63+
working-directory: ${{ github.workspace }}
64+
env:
65+
CHERE_INVOKING: 1
66+
run: |
67+
tests/runtests.sh
68+
build_mingw:
69+
runs-on: windows-latest
70+
strategy:
71+
matrix:
72+
include:
73+
- configure_options: ''
74+
steps:
75+
- uses: actions/checkout@v6
76+
- name: Set up MSYS2 with MinGW-w64
77+
uses: msys2/setup-msys2@v2
78+
with:
79+
msystem: MINGW64
80+
update: true
81+
install: autoconf automake gettext gettext-devel git libtool make mingw-w64-x86_64-gcc pkg-config
82+
- name: Build from source
83+
shell: msys2 {0}
84+
env:
85+
CONFIGURE_OPTIONS: ${{ matrix.configure_options }}
86+
run: |
87+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
88+
tests/build.sh ${CONFIGURE_OPTIONS}
89+
- name: Run tests
90+
shell: msys2 {0}
91+
run: |
92+
tests/runtests.sh

.github/workflows/check_source.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Download test data
2424
run: |
2525
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
26-
- name: Building from source
26+
- name: Build from source
2727
env:
2828
CC: ${{ matrix.compiler }}
2929
run: |
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install build dependencies
4949
run: |
5050
sudo apt -y install autoconf automake autopoint build-essential clang clang-tools git jq libtool pkg-config
51-
- name: Building from source
51+
- name: Build from source
5252
env:
5353
CC: ${{ matrix.compiler }}
5454
run: |
@@ -111,7 +111,7 @@ jobs:
111111
- name: Download test data
112112
run: |
113113
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
114-
- name: Building from source
114+
- name: Build from source
115115
env:
116116
CC: ${{ matrix.compiler }}
117117
run: |

.github/workflows/coverage.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Generate code coverage report and upload to Codecov.
2+
name: coverage
3+
on:
4+
pull_request:
5+
push:
6+
permissions: read-all
7+
jobs:
8+
coverage_cygwin:
9+
runs-on: windows-latest
10+
strategy:
11+
matrix:
12+
include:
13+
- configure_options: '--enable-code-coverage --enable-winapi=yes'
14+
codecov_name: 'cygwin64-gcc-no-optimization'
15+
steps:
16+
- name: Configure git
17+
run: git config --global core.autocrlf false
18+
- uses: actions/checkout@v6
19+
- name: Install Cygwin and build dependencies
20+
uses: cygwin/cygwin-install-action@v6
21+
with:
22+
packages: autoconf, automake, curl, gettext-devel, git, libtool, make, mingw-w64-x86_64-gcc, pkg-config
23+
platform: x86_64
24+
add-to-path: true
25+
- name: Build from source
26+
shell: bash --login -e -o pipefail -o igncr {0}
27+
working-directory: ${{ github.workspace }}
28+
env:
29+
CHERE_INVOKING: 1
30+
CONFIGURE_OPTIONS: ${{ matrix.configure_options }}
31+
LD: ld
32+
run: |
33+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
34+
tests/build.sh ${CONFIGURE_OPTIONS}
35+
- name: Run tests
36+
shell: bash --login -e -o pipefail -o igncr {0}
37+
working-directory: ${{ github.workspace }}
38+
env:
39+
CHERE_INVOKING: 1
40+
run: |
41+
tests/runtests.sh
42+
- name: Generate coverage data
43+
shell: bash --login -e -o pipefail -o igncr {0}
44+
working-directory: ${{ github.workspace }}
45+
env:
46+
CHERE_INVOKING: 1
47+
run: |
48+
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
49+
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
50+
done
51+
# Cannot use codecov/codecov-action@v6 given it tries to use cygwin sh and fails.
52+
- name: Upload coverage report to Codecov
53+
shell: pwsh
54+
env:
55+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
56+
run: |
57+
Invoke-WebRequest -Uri "https://cli.codecov.io/latest/windows/codecov.exe" -OutFile "codecov.exe"
58+
Unblock-File -Path "./codecov.exe"
59+
./codecov.exe --verbose upload-coverage --git-service github --gcov-executable gcov --name "${{ matrix.codecov_name }}"
60+
coverage_linux:
61+
runs-on: ${{ matrix.os }}
62+
strategy:
63+
matrix:
64+
include:
65+
- os: ubuntu-24.04
66+
compiler: 'gcc'
67+
configure_options: 'CPPFLAGS=-DHAVE_MEMORY_TESTS=1 --enable-code-coverage'
68+
codecov_name: 'ubuntu-24.04-gcc-no-optimization'
69+
steps:
70+
- uses: actions/checkout@v6
71+
- name: Install build dependencies
72+
run: |
73+
sudo apt -y install curl autoconf automake autopoint build-essential git libtool pkg-config
74+
- name: Download test data
75+
run: |
76+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
77+
- name: Build from source
78+
env:
79+
CC: ${{ matrix.compiler }}
80+
run: |
81+
tests/build.sh ${{ matrix.configure_options }}
82+
- name: Run tests
83+
run: |
84+
make check CHECK_WITH_STDERR=1 SKIP_TOOLS_END_TO_END_TESTS=1
85+
- name: Generate coverage data
86+
run: |
87+
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
88+
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
89+
done
90+
- name: Upload coverage report to Codecov
91+
uses: codecov/codecov-action@v6
92+
with:
93+
name: ${{ matrix.codecov_name }}
94+
token: ${{ secrets.CODECOV_TOKEN }}
95+
verbose: true
96+
coverage_mingw:
97+
runs-on: windows-latest
98+
strategy:
99+
matrix:
100+
include:
101+
- configure_options: '--enable-code-coverage --enable-winapi=yes'
102+
codecov_name: 'mingw-w64-gcc-no-optimization'
103+
steps:
104+
- uses: actions/checkout@v6
105+
- name: Set up MSYS2 with MinGW-w64
106+
uses: msys2/setup-msys2@v2
107+
with:
108+
msystem: MINGW64
109+
update: true
110+
install: autoconf automake gettext gettext-devel git libtool make mingw-w64-x86_64-gcc pkg-config
111+
- name: Build from source
112+
shell: msys2 {0}
113+
env:
114+
CONFIGURE_OPTIONS: ${{ matrix.configure_options }}
115+
run: |
116+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
117+
tests/build.sh ${CONFIGURE_OPTIONS}
118+
- name: Run tests
119+
shell: msys2 {0}
120+
run: |
121+
tests/runtests.sh
122+
- name: Generate coverage data
123+
shell: msys2 {0}
124+
run: |
125+
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
126+
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
127+
done
128+
- name: Upload coverage report to Codecov
129+
uses: codecov/codecov-action@v6
130+
with:
131+
name: ${{ matrix.codecov_name }}
132+
token: ${{ secrets.CODECOV_TOKEN }}
133+
verbose: true

appveyor.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -91,38 +91,12 @@ environment:
9191
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
9292
HOMEBREW_NO_INSTALL_CLEANUP: 1
9393
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --with-pyprefix"
94-
- TARGET: cygwin64-gcc
95-
BUILD_ENVIRONMENT: cygwin64
96-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
97-
CONFIGURE_OPTIONS: ""
98-
- TARGET: cygwin64-gcc-no-optimization
99-
BUILD_ENVIRONMENT: cygwin64
100-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
101-
CONFIGURE_OPTIONS: "--enable-code-coverage"
102-
- TARGET: mingw-w64-gcc
103-
BUILD_ENVIRONMENT: mingw-w64
104-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
105-
CONFIGURE_OPTIONS: ""
106-
- TARGET: mingw-w64-gcc-no-optimization
107-
BUILD_ENVIRONMENT: mingw-w64
108-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
109-
CONFIGURE_OPTIONS: "--enable-code-coverage"
11094

11195
install:
11296
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
11397
git clone https://github.com/libyal/vstools.git ..\vstools )
11498
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then brew untap homebrew/homebrew-cask-versions && brew update -q; fi
11599
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi
116-
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") {
117-
Invoke-WebRequest -Uri "https://cygwin.com/setup-x86_64.exe" -Outfile C:\cygwin64\setup-x86_64.exe }
118-
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
119-
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 )
120-
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
121-
git clone git://git.savannah.gnu.org/config.git ..\config )
122-
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
123-
C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc pkg-config )
124-
- ps: If (("cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization").Contains($env:TARGET)) {
125-
Invoke-WebRequest -Uri "https://uploader.codecov.io/latest/windows/codecov.exe" -Outfile ..\codecov.exe }
126100

127101
build_script:
128102
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
@@ -135,30 +109,11 @@ build_script:
135109
- ps: If (("vs2017", "vs2019", "vs2022", "vs2022-vsdebug", "vs2022-x64").Contains($env:TARGET)) {
136110
.\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" }
137111
- 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
138-
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
139-
xcopy /i /q /s C:\projects\libcdata C:\cygwin64\home\appveyor\libcdata &&
140-
xcopy /i /q ..\config\config.* C:\cygwin64\home\appveyor\libcdata &&
141-
C:\cygwin64\bin\bash -e -l -c "cd libcdata && tests/build.sh ${CONFIGURE_OPTIONS}" )
142-
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
143-
xcopy /i /q /s C:\projects\libcdata C:\msys64\home\appveyor\libcdata &&
144-
C:\msys64\usr\bin\bash -e -l -c "cd libcdata && tests/build.sh ${CONFIGURE_OPTIONS}" )
145112

146113
test_script:
147114
- cmd: rem Run tests
148115
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
149116
.\runtests.ps1 }
150117
- sh: if test ${BUILD_ENVIRONMENT} = "xcode" && test ${TARGET} != "macos-pkgbuild"; then tests/runtests.sh; fi
151118
- sh: if test ${TARGET} = "macos-pkgbuild"; then tests/pkgbuild.sh; fi
152-
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
153-
C:\cygwin64\bin\bash -l -c "cd libcdata && tests/runtests.sh" )
154-
- cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
155-
C:\msys64\usr\bin\bash -l -c "cd libcdata && tests/runtests.sh" )
156-
157-
after_test:
158-
- cmd: if [%TARGET%]==[cygwin64-gcc-no-optimization] (
159-
C:\cygwin64\bin\bash -e -l -c "cd libcdata && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
160-
C:\projects\codecov.exe -R \cygwin64\home\appveyor\libcdata --name %TARGET% )
161-
- cmd: if [%TARGET%]==[mingw-w64-gcc-no-optimization] (
162-
C:\msys64\usr\bin\bash -e -l -c "cd libcdata && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" &&
163-
C:\projects\codecov.exe -R \msys64\home\appveyor\libcdata --name %TARGET% )
164119

0 commit comments

Comments
 (0)