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
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=78de7eb4ff54bd12c9abb790107edc86bcda07d8
commit_hash=bb58b2a1cc894d58a55bf745be78f5d27029e245
2 changes: 1 addition & 1 deletion infra/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @ednolan @neatudarius @rishyak @wusatosi
* @ednolan @neatudarius @rishyak @wusatosi @JeffGarland
36 changes: 0 additions & 36 deletions infra/.github/workflows/beman-tidy.yml

This file was deleted.

9 changes: 5 additions & 4 deletions infra/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
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
exclude: ^.*/tests/.*/data/ # Exclude test data directories

# Python linting and formatting
# 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
13 changes: 1 addition & 12 deletions infra/LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -216,15 +217,3 @@ conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.

==============================================================================
Software from third parties included in the Beman Project:
==============================================================================
The Beman Project contains third party software which is under different license
terms. All such code will be identified clearly using at least one of two
mechanisms:
1) It will be in a separate directory tree with its own `LICENSE.txt` or
`LICENSE` file at the top containing the specific license and restrictions
which apply to that software, or
2) It will contain specific license and restriction terms at the top of every
file.
48 changes: 46 additions & 2 deletions infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,54 @@

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

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!
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}")
3 changes: 3 additions & 0 deletions infra/cmake/gnu-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,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}")
3 changes: 3 additions & 0 deletions infra/cmake/llvm-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,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}")
3 changes: 3 additions & 0 deletions infra/cmake/msvc-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,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}")
10 changes: 9 additions & 1 deletion infra/cmake/use-fetch-content.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ function(BemanExemplar_provideDependency method package_name)
APPEND
BemanExemplar_debug
"Redirecting find_package calls for ${BemanExemplar_pkgName} "
"to FetchContent logic fetching ${BemanExemplar_repo} at "
"to FetchContent logic.\n"
)
string(
APPEND
BemanExemplar_debug
"Fetching ${BemanExemplar_repo} at "
"${BemanExemplar_tag} according to ${BemanExemplar_lockfile}."
)
message(DEBUG "${BemanExemplar_debug}")
Expand All @@ -177,3 +182,6 @@ cmake_language(
SET_DEPENDENCY_PROVIDER BemanExemplar_provideDependency
SUPPORTED_METHODS FIND_PACKAGE
)

# Add this dir to the module path so that `find_package(beman-install-library)` works
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}")
1 change: 0 additions & 1 deletion infra/tools/beman-tidy/.markdownlintignore

This file was deleted.

1 change: 0 additions & 1 deletion infra/tools/beman-tidy/.python-version

This file was deleted.

160 changes: 0 additions & 160 deletions infra/tools/beman-tidy/README.md

This file was deleted.

Loading