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 .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentPPDirectives: BeforeHash
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
Expand Down
16 changes: 0 additions & 16 deletions .devcontainer/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions .devcontainer/devcontainer.json

This file was deleted.

3 changes: 0 additions & 3 deletions .devcontainer/postcreate.sh

This file was deleted.

1 change: 1 addition & 0 deletions .exemplar_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ab5c7c0cbf1f67eb43b7be9c2d18acd4d6de1ea4
22 changes: 1 addition & 21 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Codeowners for reviews on PRs

# Note(river):
# **Please understand how codeowner file work before uncommenting anything in this section:**
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# For projects using exemplar as a template and intend to reuse its infrastructure,
# River (@wusatosi) helped create most of the original infrastructure under the scope described below,
# they are more than happy to help out with any PRs downstream,
# as well as to sync any useful change upstream to exemplar.
#
# Github Actions:
# .github/workflows/ @wusatosi # Add other project owners here
#
# Devcontainer:
# .devcontainer/ @wusatosi # Add other project owners here
#
# Pre-commit:
# .pre-commit-config.yaml @wusatosi # Add other project owners here
# .markdownlint.yaml @wusatosi # Add other project owners here

* @neatudarius @wusatosi @JeffGarland @changkhothuychung
* @changkhothuychung
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/implementation-deficiency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Implementation Deficiency
about: Report a bug or performance issue of our implementation
title: ''
labels: bug
assignees: ''

---

<!--
Please follow our code of conduct when engaging in the Beman community:
https://github.com/bemanproject/beman/blob/main/docs/code_of_conduct.md
-->

## Describe the deficiency

A clear and concise description of what the deficiency is.
Link all relevant issues.
This could be a bug, or a performance problem.

## To Reproduce

```c++
// Use case
```

## Expected Behavior

A clear and concise description of what you expected to happen.

## Additional Discussions

Add any other context about the problem here.
If you believe your issue is platform dependent,
please post your compiler versions here.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/infrastructure-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Infrastructure Issues
about: Report a bug or feature request with our Infrastructure
title: ''
labels: infra
assignees: ''

---

<!--
Please follow our code of conduct when engaging in the Beman community:
https://github.com/bemanproject/beman/blob/main/docs/code_of_conduct.md
-->

## I am attempting to

Describe what you were attempting to do.

## Expected Behavior

A clear and concise description of what you expected to happen.

## Current Behavior

A clear and concise description of what actually happened.

## Additional Discussions

Add any other context about the problem here.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/paper-discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Paper Discussion
about: Provide feedback to current API
title: ''
labels: ''
assignees: ''

---

<!--
Please follow our code of conduct when engaging in the Beman community:
https://github.com/bemanproject/beman/blob/main/docs/code_of_conduct.md
-->

## Use case

Describe your concerns about adding this change to the C++ Standard Library.

```c++
// example snippet
```

## What I like

Let us know what you find positive about current approach / design.

## What I dislike

Let us know what you find negative about current approach / design.

## Discussion

Let us know if you have any more remarks.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!--
Please take note of the following when contributing:
- Our code of conduct: https://github.com/bemanproject/beman/blob/main/docs/code_of_conduct.md
- The Beman Standard: https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md
-->
10 changes: 5 additions & 5 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
pull_request:
workflow_dispatch:
schedule:
- cron: '30 15 * * *'
- cron: '16 15 * * 2'

jobs:
beman-submodule-check:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.1.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.5.3

preset-test:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.1.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.5.3
with:
matrix_config: >
[
Expand All @@ -27,7 +27,7 @@ jobs:
]

build-and-test:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.1.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.5.3
with:
matrix_config: >
{
Expand Down Expand Up @@ -93,4 +93,4 @@ jobs:
create-issue-when-fault:
needs: [preset-test, build-and-test]
if: failure() && github.event_name == 'schedule'
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.1.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.5.3
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
branches:
- main

permissions:
contents: read
checks: write
issues: write
pull-requests: write

jobs:
pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.1.0
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.5.3
15 changes: 15 additions & 0 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Weekly pre-commit autoupdate

on:
workflow_dispatch:
schedule:
- cron: "8 14 * * 4"

jobs:
auto-update-pre-commit:
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.5.3
secrets:
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

/.cache
/compile_commands.json
/build

Expand Down
11 changes: 7 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ 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: v21.1.2
rev: v22.1.4
hooks:
- id: clang-format
types_or: [c++, c]

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.22.3
- repo: https://github.com/BlankSpruce/gersemi-pre-commit
rev: 0.27.2
hooks:
- id: gersemi
name: CMake linting
exclude: ^.*/tests/.*/data/ # Exclude test data directories

# Markdown linting
# Config file: .markdownlint.yaml
Expand All @@ -34,7 +35,7 @@ repos:
# - id: markdownlint

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

Expand All @@ -43,3 +44,5 @@ repos:
rev: v0.3.1
hooks:
- id: beman-tidy

exclude: 'cookiecutter/|infra/'
50 changes: 24 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,54 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.25)
cmake_minimum_required(VERSION 3.30...4.3)

project(
beman.cache_latest # CMake Project Name, which is also the name of the top-level
# targets (e.g., library, executable, etc.).
DESCRIPTION "A Beman library cache_latest"
DESCRIPTION
"A C++ ranges adaptor that caches the result of the last dereference of the underlying iterator"
LANGUAGES CXX
VERSION 1.0.0
VERSION 0.1.0
)

enable_testing()

# [CMAKE.SKIP_TESTS]
option(
BEMAN_CACHE_LATEST_BUILD_TESTS
"Enable building tests and test infrastructure. Default: ON. Values: { ON, OFF }."
"Enable building tests and test infrastructure. Default: ${PROJECT_IS_TOP_LEVEL}. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
)

# [CMAKE.SKIP_EXAMPLES]
option(
BEMAN_CACHE_LATEST_BUILD_EXAMPLES
"Enable building examples. Default: ON. Values: { ON, OFF }."
"Enable building examples. Default: ${PROJECT_IS_TOP_LEVEL}. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
)

option(
BEMAN_CACHE_LATEST_INSTALL_CONFIG_FILE_PACKAGE
"Enable creating and installing a CMake config-file package. Default: ${PROJECT_IS_TOP_LEVEL}. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
# for find of beman_install_library and configure_build_telemetry
include(infra/cmake/beman-install-library.cmake)
include(infra/cmake/BuildTelemetryConfig.cmake)

add_library(beman.cache_latest INTERFACE)
add_library(beman::cache_latest ALIAS beman.cache_latest)

target_sources(
beman.cache_latest
PUBLIC FILE_SET HEADERS BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include"
)

include(FetchContent)
include(GNUInstallDirs)
set_target_properties(
beman.cache_latest
PROPERTIES VERIFY_INTERFACE_HEADER_SETS ${PROJECT_IS_TOP_LEVEL}
)

if(BEMAN_CACHE_LATEST_BUILD_TESTS)
# Fetch GoogleTest
FetchContent_Declare(
GTest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG
6910c9d9165801d8827d628cb72eb7ea9dd538c5 # release-1.16.0
EXCLUDE_FROM_ALL
)
set(INSTALL_GTEST OFF) # Disable GoogleTest installation
FetchContent_MakeAvailable(GTest)
endif()
add_subdirectory(include/beman/cache_latest)

add_subdirectory(src/beman/cache_latest)
beman_install_library(beman.cache_latest TARGETS beman.cache_latest)
configure_build_telemetry()

if(BEMAN_CACHE_LATEST_BUILD_TESTS)
enable_testing()
add_subdirectory(tests/beman/cache_latest)
endif()

Expand Down
Loading
Loading