Skip to content

Commit be88ef6

Browse files
authored
Merge branch 'main' into feature/export-config-package
2 parents c0f2538 + 5765b9d commit be88ef6

File tree

3 files changed

+38
-9
lines changed

3 files changed

+38
-9
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
config:
1616
- {name: "Ubuntu Clang 20", os: ubuntu-24.04, toolchain: "clang-20", clang_version: 20, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" "}
1717
# Note: clang-19 + Asan setup causes errors on some platforms. Temporary skip some checks via .asan_options.
18-
- {name: "Ubuntu Clang 19", os: ubuntu-24.04, toolchain: "clang-19", clang_version: 19, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" ", asan_options: "new_delete_type_mismatch=0"}
19-
- {name: "Ubuntu Clang 18", os: ubuntu-24.04, toolchain: "clang-18", clang_version: 18, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" "}
20-
- {name: "Ubuntu Clang 17", os: ubuntu-24.04, toolchain: "clang-17", clang_version: 17, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" "}
21-
- {name: "Ubuntu GCC 14", os: ubuntu-24.04, toolchain: "gcc-14", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" "}
22-
- {name: "Ubuntu GCC 13", os: ubuntu-24.04, toolchain: "gcc-13", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" "}
23-
- {name: "Ubuntu GCC 12", os: ubuntu-24.04, toolchain: "gcc-12", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Debug;Asan\" "}
18+
- {name: "Ubuntu Clang 19", os: ubuntu-24.04, toolchain: "clang-19", clang_version: 19, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" ", asan_options: "new_delete_type_mismatch=0"}
19+
- {name: "Ubuntu Clang 18", os: ubuntu-24.04, toolchain: "clang-18", clang_version: 18, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
20+
- {name: "Ubuntu Clang 17", os: ubuntu-24.04, toolchain: "clang-17", clang_version: 17, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
21+
- {name: "Ubuntu GCC 14", os: ubuntu-24.04, toolchain: "gcc-14", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan;Gcov\" ", coverage: true}
22+
- {name: "Ubuntu GCC 13", os: ubuntu-24.04, toolchain: "gcc-13", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
23+
- {name: "Ubuntu GCC 12", os: ubuntu-24.04, toolchain: "gcc-12", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
2424
steps:
2525
- uses: actions/checkout@v3
2626
with:
@@ -78,7 +78,11 @@ jobs:
7878
sudo apt-get install g++-${GCC_VERSION} gcc-${GCC_VERSION}
7979
find /usr/lib/x86_64-linux-gnu/ -name libstdc++.so*
8080
g++-${GCC_VERSION} --version
81-
type g++-${GCC_VERSION}
81+
- name: Install Gcovr
82+
if: matrix.config.coverage
83+
run: |
84+
set -x
85+
sudo apt-get install gcovr
8286
- name: CMake Configure
8387
run: |
8488
set -x
@@ -108,8 +112,31 @@ jobs:
108112
- name: Install
109113
run: |
110114
set -x
115+
cmake --install .build --config RelWithDebInfo --component beman_optional26_development --verbose
116+
- name: CMake Gcov Build
117+
if: matrix.config.coverage
118+
run: |
119+
set -x
120+
cmake --build .build --config Gcov --target all_verify_interface_header_sets -- -k 0
121+
cmake --build .build --config Gcov --target all -- -k 0
122+
- name: CMake Gcov Test
123+
if: matrix.config.coverage
124+
run: |
125+
set -x
126+
ctest --build-config Gcov --output-on-failure --test-dir .build
127+
- name: Generate Coverage
128+
if: matrix.config.coverage
129+
run: |
130+
set -x
131+
cmake --build .build --config Gcov --target process_coverage -- -k 0
132+
- name: Coveralls
133+
if: matrix.config.coverage
134+
uses: coverallsapp/github-action@main
135+
with:
136+
file: ${{runner.workspace}}/optional26/.build/coverage.json
137+
github-token: ${{ secrets.GITHUB_TOKEN }}
111138
cmake --install .build --config RelWithDebInfo --verbose
112139
- name: CMake Debug Workflow
113140
run: |
114141
set -x
115-
cmake --workflow --preset ${{ matrix.config.toolchain }}
142+
cmake --workflow --preset ${{ matrix.config.toolchain }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SPDX-License-Identifier: 2.0 license with LLVM exceptions
55
-->
66

7-
![CI Tests](https://github.com/bemanproject/optional26/actions/workflows/ci.yml/badge.svg)
7+
![CI Tests](https://github.com/bemanproject/optional26/actions/workflows/ci.yml/badge.svg) [![Coverage](https://coveralls.io/repos/github/bemanproject/optional26/badge.svg?branch=main)](https://coveralls.io/github/bemanproject/optional26?branch=main)
88

99
This repository implements `std::optional` extensions targeting C++26. The `beman.optional26` library aims to evaluate
1010
the stability, the usability, and the performance of these proposed changes before they are officially adopted by WG21

cmake/gcovr.cfg.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ html-self-contained = yes
99
print-summary = yes
1010
filter = .*/beman/optional26/.*
1111
exclude = .*\.t\.cpp
12+
coveralls = coverage.json
13+
coveralls-pretty = yes

0 commit comments

Comments
 (0)