Skip to content

Commit 6af8df2

Browse files
committed
Bump infra beman-submodule to latest
This applies the separation of beman-tidy out of the infra repository and should fix any failing beman-submodule consistency checks in CI. And updates pre-commit to latest for compatibility with the latest infra.
1 parent 06bce68 commit 6af8df2

File tree

195 files changed

+243
-5930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+243
-5930
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -13,14 +13,14 @@ 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: v20.1.7
16+
rev: v21.1.2
1717
hooks:
1818
- id: clang-format
1919
types_or: [c++, c]
2020

2121
# CMake linting and formatting
2222
- repo: https://github.com/BlankSpruce/gersemi
23-
rev: 0.15.1
23+
rev: 0.22.3
2424
hooks:
2525
- id: gersemi
2626
name: CMake linting
@@ -35,7 +35,7 @@ repos:
3535
# - id: markdownlint
3636

3737
- repo: https://github.com/codespell-project/codespell
38-
rev: v2.3.0
38+
rev: v2.4.1
3939
hooks:
4040
- id: codespell
4141
args: ["--ignore-words-list=wil"]

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=d7c51d169860c5ceeb8a026859bd24820ab6826d
3+
commit_hash=bb58b2a1cc894d58a55bf745be78f5d27029e245

infra/.github/workflows/beman-tidy.yml

Lines changed: 0 additions & 111 deletions
This file was deleted.

infra/.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: check-added-large-files
99

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

1515
# CMake linting and formatting
1616
- repo: https://github.com/BlankSpruce/gersemi
17-
rev: 0.15.1
17+
rev: 0.22.3
1818
hooks:
1919
- id: gersemi
2020
name: CMake linting
@@ -24,7 +24,7 @@ repos:
2424
# config file: ruff.toml (not currently present but add if needed)
2525
# https://docs.astral.sh/ruff/configuration/
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.12.1
27+
rev: v0.13.2
2828
hooks:
2929
- id: ruff-check
3030
files: ^tools/beman-tidy/

infra/README.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,54 @@
22

33
<!-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -->
44

5-
[![beman-tidy tests](https://github.com/bemanproject/infra/actions/workflows/beman-tidy.yml/badge.svg)](https://github.com/bemanproject/infra/actions/workflows/beman-tidy.yml)
6-
75
This repository contains the infrastructure for The Beman Project. This is NOT a library repository,
86
so it does not respect the usual structure of a Beman library repository nor The Beman Standard!
97

108
## Description
119

10+
* `cmake/`: CMake modules and toolchain files used by Beman libraries.
1211
* `containers/`: Containers used for CI builds and tests in the Beman org.
1312
* `tools/`: Tools used to manage the infrastructure and the codebase (e.g., linting, formatting, etc.).
13+
14+
## Usage
15+
16+
This repository is intended to be used as a beman-submodule in other Beman repositories. See
17+
[the Beman Submodule documentation](./tools/beman-submodule/README.md) for details.
18+
19+
20+
### CMake Modules
21+
22+
23+
#### `beman_install_library`
24+
25+
The CMake modules in this repository are intended to be used by Beman libraries. Use the
26+
`beman_add_install_library_config()` function to install your library, along with header
27+
files, any metadata files, and a CMake config file for `find_package()` support.
28+
29+
```cmake
30+
add_library(beman.something)
31+
add_library(beman::something ALIAS beman.something)
32+
33+
# ... configure your target as needed ...
34+
35+
find_package(beman-install-library REQUIRED)
36+
beman_install_library(beman.something)
37+
```
38+
39+
Note that the target must be created before calling `beman_install_library()`. The module
40+
also assumes that the target is named using the `beman.something` convention, and it
41+
uses that assumption to derive the names to match other Beman standards and conventions.
42+
If your target does not follow that convention, raise an issue or pull request to add
43+
more configurability to the module.
44+
45+
The module will configure the target to install:
46+
47+
* The library target itself
48+
* Any public headers associated with the target
49+
* CMake files for `find_package(beman.something)` support
50+
51+
Some options for the project and target will also be supported:
52+
53+
* `BEMAN_INSTALL_CONFIG_FILE_PACKAGES` - a list of package names (e.g., `beman.something`) for which to install the config file
54+
(default: all packages)
55+
* `<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`.

infra/cmake/appleclang-toolchain.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "${RELEASE_FLAGS}")
3939

4040
set(CMAKE_C_FLAGS_RELEASE_INIT "${RELEASE_FLAGS}")
4141
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${RELEASE_FLAGS}")
42+
43+
# Add this dir to the module path so that `find_package(beman-install-library)` works
44+
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}")

0 commit comments

Comments
 (0)