Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,14 +13,14 @@ repos:
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v21.1.2
hooks:
- id: clang-format
types_or: [c++, c]

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.15.1
rev: 0.22.3
hooks:
- id: gersemi
name: CMake linting
Expand Down
4 changes: 2 additions & 2 deletions include/beman/task/detail/into_optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ inline constexpr struct into_optional_t : beman::execution::sender_adaptor_closu
template <typename Receiver>
struct make_object {
template <typename... A>
auto
operator()(A&&... a) const -> decltype(get_type(::beman::execution::get_env(std::declval<Receiver>()))) {
auto operator()(A&&... a) const
-> decltype(get_type(::beman::execution::get_env(std::declval<Receiver>()))) {
if constexpr (sizeof...(A) == 0u)
return {};
else
Expand Down
2 changes: 1 addition & 1 deletion infra/.beman_submodule
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[beman_submodule]
remote=https://github.com/bemanproject/infra.git
commit_hash=d7c51d169860c5ceeb8a026859bd24820ab6826d
commit_hash=bb58b2a1cc894d58a55bf745be78f5d27029e245
111 changes: 0 additions & 111 deletions infra/.github/workflows/beman-tidy.yml

This file was deleted.

8 changes: 4 additions & 4 deletions infra/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.15.1
rev: 0.22.3
hooks:
- id: gersemi
name: CMake linting
Expand All @@ -24,7 +24,7 @@ repos:
# config file: ruff.toml (not currently present but add if needed)
# https://docs.astral.sh/ruff/configuration/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.1
rev: v0.13.2
hooks:
- id: ruff-check
files: ^tools/beman-tidy/
Expand Down
46 changes: 44 additions & 2 deletions infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,54 @@

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

[![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)

This repository contains the infrastructure for The Beman Project. This is NOT a library repository,
so it does not respect the usual structure of a Beman library repository nor The Beman Standard!

## Description

* `cmake/`: CMake modules and toolchain files used by Beman libraries.
* `containers/`: Containers used for CI builds and tests in the Beman org.
* `tools/`: Tools used to manage the infrastructure and the codebase (e.g., linting, formatting, etc.).

## Usage

This repository is intended to be used as a beman-submodule in other Beman repositories. See
[the Beman Submodule documentation](./tools/beman-submodule/README.md) for details.


### CMake Modules


#### `beman_install_library`

The CMake modules in this repository are intended to be used by Beman libraries. Use the
`beman_add_install_library_config()` function to install your library, along with header
files, any metadata files, and a CMake config file for `find_package()` support.

```cmake
add_library(beman.something)
add_library(beman::something ALIAS beman.something)

# ... configure your target as needed ...

find_package(beman-install-library REQUIRED)
beman_install_library(beman.something)
```

Note that the target must be created before calling `beman_install_library()`. The module
also assumes that the target is named using the `beman.something` convention, and it
uses that assumption to derive the names to match other Beman standards and conventions.
If your target does not follow that convention, raise an issue or pull request to add
more configurability to the module.

The module will configure the target to install:

* The library target itself
* Any public headers associated with the target
* CMake files for `find_package(beman.something)` support

Some options for the project and target will also be supported:

* `BEMAN_INSTALL_CONFIG_FILE_PACKAGES` - a list of package names (e.g., `beman.something`) for which to install the config file
(default: all packages)
* `<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`.
3 changes: 3 additions & 0 deletions infra/cmake/appleclang-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "${RELEASE_FLAGS}")

set(CMAKE_C_FLAGS_RELEASE_INIT "${RELEASE_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${RELEASE_FLAGS}")

# Add this dir to the module path so that `find_package(beman-install-library)` works
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}")
Loading