Skip to content

Remove EX_PENDING, it's not needed with recent version of Cli. #296

Remove EX_PENDING, it's not needed with recent version of Cli.

Remove EX_PENDING, it's not needed with recent version of Cli. #296

Workflow file for this run

# Copyright Glen Knowles 2021 - 2025.
# Distributed under the Boost Software License, Version 1.0.
#
# github-build.yml
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch: {}
jobs:
build-win:
strategy:
matrix:
platform: [x64]
configuration: [Debug, Release]
toolset: [v143]
image: [windows-2025]
coverage: [false]
include:
- platform: x64
configuration: Debug
toolset: v143
image: windows-2025
coverage: true
runs-on: ${{matrix.image}}
defaults:
run:
shell: cmd
env:
tests: |
bin\bitspan-t
bin\charbuf-t
bin\file-t
bin\glob-t
"bin\hpack-t --test"
"bin\http-t --test"
bin\intset-t
"bin\json-t --test"
bin\list-t
bin\math-t
bin\msgpack-t
"bin\pargen --test"
bin\path-t
bin\perf-t
bin\str-t
"bin\strtrie-t --test"
bin\time-t
bin\tokentable-t
"bin\xml --test"
steps:
- name: Setup OpenCppCoverage
if: matrix.coverage
working-directory: ${{github.workspace}}
run: |
choco install OpenCppCoverage -y
echo "C:\Program Files\OpenCppCoverage" >> %GITHUB_PATH%
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build
working-directory: ${{github.workspace}}
run: |
if not exist "conf\app.xml" copy "conf\app.xml.sample" "conf\app.xml"
md build
cd build
set generator=Visual Studio 16 2019
if "${{matrix.toolset}}" == "v142" set generator=Visual Studio 17 2022
if "${{matrix.toolset}}" == "v143" set generator=Visual Studio 17 2022
cmake .. -G"%generator%" -A${{matrix.platform}} -T${{matrix.toolset}}
cmake . -DCMAKE_BUILD_TYPE=${{matrix.configuration}}^
-DCMAKE_INSTALL_PREFIX=publish -DINSTALL_LIBS:BOOL=ON
cmake --build . --target install --config ${{matrix.configuration}}
cd publish
:: 7z a dimcli-latest.zip include lib
- name: Test
if: ${{ !matrix.coverage }}
working-directory: ${{github.workspace}}
run: |
for %%t in (${{env.tests}}) do (
%%~t
if errorlevel 1 goto :eof
)
- name: Test Coverage
if: matrix.coverage
working-directory: ${{github.workspace}}
run: |
set prog="C:\Program Files\OpenCppCoverage\OpenCppCoverage.exe"
set opts=--export_type binary:temp.cov^
--modules ${{github.workspace}}^
--sources ${{github.workspace}}^
--excluded_sources vendor^
--excluded_sources tests^
--excluded_sources testlibs^
--excluded_sources *.g.cpp^
--excluded_sources *.g.h^
--excluded_line_regex ".* LCOV_EXCL_LINE.*"
for %%t in (${{env.tests}}) do (
if exist merged.cov (
%prog% %opts% --input_coverage merged.cov -- %%~t
) else (
%prog% %opts% -- %%~t
)
if errorlevel 1 goto :eof
copy temp.cov merged.cov
)
%prog% --input_coverage merged.cov --export_type cobertura:merged.xml
- name: Report Coverage
if: matrix.coverage
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
files: merged.xml
fail_ci_if_error: true