Skip to content

Commit c1b309d

Browse files
committed
Exemplar updates since 2026-04-05
Bump infra-workflows from 1.5.0 to 1.5.1 across all CI workflow files (updates actions/checkout version). Bump infra-workflows version from 1.5.1 to 1.5.2 in all CI workflow files (ci_tests.yml, pre-commit-check.yml, pre-commit-update.yml). Add build telemetry support: include BuildTelemetryConfig.cmake and call configure_build_telemetry() in CMakeLists.txt; add BuildTelemetryConfig.cmake, BuildTelemetry.cmake, telemetry.sh to infra/cmake; rename BEMAN_ to BEMAN_INSTALL_ argument prefixes in beman-install-library.cmake and update Config.cmake.in accordingly; bump infra submodule hash and pre-commit tool versions (codespell v2.4.2, gersemi-pre-commit 0.27.2). Bump infra-workflows version from 1.5.2 to 1.5.3 in all GitHub Actions workflows (fixes deprecated Node.js v20 actions). Add beman-tidy args (".", "--verbose") and a --require-all TODO comment to the beman-tidy pre-commit hook in .pre-commit-config.yaml. 068a39cb: Enable --require-all in beman-tidy pre-commit hook args (remove commented-out flag and TODO comment). 9bc73c8b: Remove explicit args from beman-tidy pre-commit hook to use defaults instead of [".", "--verbose", "--require-all"]. exemplar 26982cd: Restore Clang 18 libc++ CI tests (add libc++ alongside libstdc++ for c++23 in the Clang 18 build-and-test matrix entry). b1e7015b1bd62ce5b20009cec7ee98ba5c783818: Update clang-format pre-commit hook to v22.1.4.
1 parent eeee2c7 commit c1b309d

16 files changed

Lines changed: 279 additions & 62 deletions

.exemplar_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0e615052846f61ed12b4cac61accac8ad0074d13
1+
b1e7015b1bd62ce5b20009cec7ee98ba5c783818

.github/workflows/ci_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ on:
1313

1414
jobs:
1515
beman-submodule-check:
16-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.5.0
16+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.5.3
1717

1818
preset-test:
19-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.5.0
19+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.5.3
2020
with:
2121
matrix_config: >
2222
[
@@ -31,7 +31,7 @@ jobs:
3131
]
3232
3333
build-and-test:
34-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.5.0
34+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.5.3
3535
with:
3636
matrix_config: >
3737
{
@@ -94,7 +94,7 @@ jobs:
9494
{ "versions": ["18"],
9595
"tests": [
9696
{ "cxxversions": ["c++23"],
97-
"tests": [{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
97+
"tests": [{"stdlibs": ["libstdc++", "libc++"], "tests": ["Release.Default"]}]
9898
}
9999
]
100100
}
@@ -126,4 +126,4 @@ jobs:
126126
create-issue-when-fault:
127127
needs: [preset-test, build-and-test]
128128
if: failure() && github.event_name == 'schedule'
129-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.5.0
129+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.5.3

.github/workflows/pre-commit-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010

1111
jobs:
1212
pre-commit:
13-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.5.0
13+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.5.3

.github/workflows/pre-commit-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
auto-update-pre-commit:
12-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.5.0
12+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.5.3
1313
secrets:
1414
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
1515
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
# This brings in a portable version of clang-format.
1414
# See also: https://github.com/ssciwr/clang-format-wheel
1515
- repo: https://github.com/pre-commit/mirrors-clang-format
16-
rev: v22.1.3
16+
rev: v22.1.4
1717
hooks:
1818
- id: clang-format
1919
types_or: [c++, c]

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ option(
2424
${PROJECT_IS_TOP_LEVEL}
2525
)
2626

27-
# for find of beman-install-library
27+
# for find of beman_install_library and configure_build_telemetry
2828
include(infra/cmake/beman-install-library.cmake)
29+
include(infra/cmake/BuildTelemetryConfig.cmake)
2930

3031
add_library(beman.transform_view INTERFACE)
3132
add_library(beman::transform_view ALIAS beman.transform_view)
@@ -43,6 +44,7 @@ set_target_properties(
4344
add_subdirectory(include/beman/transform_view)
4445

4546
beman_install_library(beman.transform_view TARGETS beman.transform_view)
47+
configure_build_telemetry()
4648

4749
if(BEMAN_TRANSFORM_VIEW_BUILD_TESTS)
4850
enable_testing()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You can disable building tests by setting CMake option `BEMAN_TRANSFORM_VIEW_BUI
7777
|------------|---------|---------------|-------------------|
7878
| GCC | 15-14 | C++26, C++23 | libstdc++ |
7979
| Clang | 22-19 | C++26, C++23 | libstdc++, libc++ |
80-
| Clang | 18 | C++23 | libstdc++ |
80+
| Clang | 18 | C++23 | libstdc++, libc++ |
8181
| AppleClang | latest | C++26, C++23 | libc++ |
8282
| MSVC | latest | C++23 | MSVC STL |
8383

infra/.beman_submodule

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[beman_submodule]
22
remote=https://github.com/bemanproject/infra.git
3-
commit_hash=63cb577f6484f13ce3349de49ad5ce27e20bf1da
3+
commit_hash=dfdb103b5fc9cccd3424c377130e318466f1dd89

infra/.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ repos:
88
- id: check-added-large-files
99

1010
- repo: https://github.com/codespell-project/codespell
11-
rev: v2.4.1
11+
rev: v2.4.2
1212
hooks:
1313
- id: codespell
1414

1515
# CMake linting and formatting
16-
- repo: https://github.com/BlankSpruce/gersemi
17-
rev: 0.22.3
16+
- repo: https://github.com/BlankSpruce/gersemi-pre-commit
17+
rev: 0.27.2
1818
hooks:
1919
- id: gersemi
2020
name: CMake linting

infra/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,37 @@ Some options for the project and target will also be supported:
5252
* `BEMAN_INSTALL_CONFIG_FILE_PACKAGES` - a list of package names (e.g., `beman.something`) for which to install the config file
5353
(default: all packages)
5454
* `<BEMAN_NAME>_INSTALL_CONFIG_FILE_PACKAGE` - a per-project option to enable/disable config file installation (default: `ON` if the project is top-level, `OFF` otherwise). For instance for `beman.something`, the option would be `BEMAN_SOMETHING_INSTALL_CONFIG_FILE_PACKAGE`.
55+
56+
# BuildTelemetry
57+
58+
The cmake modules in this library provide access to CMake instrumentation data in Google Trace format which is visualizable with chrome://tracing and https://ui.perfetto.dev.
59+
60+
Telemetry may be enabled in several ways:
61+
62+
## `include`
63+
64+
```cmake
65+
include (infra/cmake/BuildTelemetry.cmake)
66+
configure_build_telemetry()
67+
```
68+
69+
## `find_package`
70+
71+
```cmake
72+
find_package(BuildTelemetry)
73+
configure_build_telemetry()
74+
```
75+
76+
as long as [BuildTelemetryConfig.cmake](./cmake/BuildTelemetryConfig.cmake) is in your module path.
77+
78+
## `CMAKE_PROJECT_TOP_LEVEL_INCLUDES`
79+
A non-invasive way to inject this telemetry into a CMake build you do not want to modify.
80+
Add:
81+
```sh
82+
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=infra/cmake/BuildTelemetry.cmake
83+
```
84+
To the cmake invocation.
85+
86+
In any form, CMake will call `telemetry.sh` which will copy the trace data in json format into a `.trace` subdirectory within the build directory.
87+
88+
Multiple calls to `configure_build_telemetry` will only configure the callback hooks once, so it is safe to enable multiple times, including by TOP_LEVEL_INCLUDE.

0 commit comments

Comments
 (0)