Skip to content

Commit 17cc1c4

Browse files
committed
Bump beman-submodules to latest main
1 parent 94fb5a8 commit 17cc1c4

278 files changed

Lines changed: 5306 additions & 1626 deletions

File tree

Some content is hidden

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

.github/workflows/.beman_submodule

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[beman_submodule]
22
remote=https://github.com/bemanproject/infra-workflows.git
3-
commit_hash=51b9bf5a86a40dbf0cf746429ada367e322c0bf0
3+
commit_hash=962bc39d246b4dd3e1fc34250a66d188610c30e7
44
allow_untracked_files=True

.github/workflows/reusable-beman-submodule-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
uses: actions/checkout@v4
1818
- name: beman submodule consistency check
1919
run: |
20-
(set -o pipefail; ${{ inputs.infra_path }}/tools/beman-submodule/beman-submodule status | grep -qvF '+')
20+
(set -eo pipefail; while read line ; do echo $line | grep -qvF '+' ; done < <(${{ inputs.infra_path }}/tools/beman-submodule/beman-submodule status))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[beman_submodule]
22
remote=https://github.com/bemanproject/infra-workflows.git
3-
commit_hash=51b9bf5a86a40dbf0cf746429ada367e322c0bf0
3+
commit_hash=962bc39d246b4dd3e1fc34250a66d188610c30e7
44
allow_untracked_files=True

cookiecutter/{{cookiecutter.project_name}}/.github/workflows/reusable-beman-submodule-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
uses: actions/checkout@v4
1818
- name: beman submodule consistency check
1919
run: |
20-
(set -o pipefail; ${{ inputs.infra_path }}/tools/beman-submodule/beman-submodule status | grep -qvF '+')
20+
(set -eo pipefail; while read line ; do echo $line | grep -qvF '+' ; done < <(${{ inputs.infra_path }}/tools/beman-submodule/beman-submodule status))
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=b8137a68c4bb05e30ac619820fffc92ca7d9d3ca
3+
commit_hash=d7c51d169860c5ceeb8a026859bd24820ab6826d

cookiecutter/{{cookiecutter.project_name}}/infra/.github/workflows/beman-tidy.yml

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ on:
77
branches:
88
- main
99
pull_request:
10+
workflow_call:
1011
workflow_dispatch:
12+
schedule:
13+
- cron: '0 6 * * *' # 09:00AM EEST (@neatudarius' timezone)
1114

1215
jobs:
13-
tests:
16+
run_linter:
1417
runs-on: ubuntu-latest
1518
defaults:
1619
run:
@@ -28,9 +31,81 @@ jobs:
2831
2932
- name: Run linter
3033
run: |
31-
echo "Running linter"
3234
uv run ruff check --diff
3335
36+
run_tests:
37+
runs-on: ubuntu-latest
38+
defaults:
39+
run:
40+
working-directory: tools/beman-tidy
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v5
47+
48+
- name: Sync environment
49+
run: |
50+
uv sync
51+
3452
- name: Run tests
3553
run: |
3654
uv run pytest tests/ -v
55+
56+
build_and_install:
57+
runs-on: ubuntu-latest
58+
defaults:
59+
run:
60+
working-directory: tools/beman-tidy
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v4
64+
65+
- name: Install uv
66+
uses: astral-sh/setup-uv@v5
67+
68+
- name: Sync environment
69+
run: |
70+
uv sync
71+
72+
- name: Build and install beman-tidy
73+
run: |
74+
uv clean
75+
uv build
76+
python3 -m pip install dist/beman_tidy-0.1.0-py3-none-any.whl --force-reinstall
77+
beman-tidy --help
78+
79+
run_on_exemplar:
80+
runs-on: ubuntu-latest
81+
defaults:
82+
run:
83+
working-directory: tools/beman-tidy
84+
steps:
85+
- name: Checkout code
86+
uses: actions/checkout@v4
87+
88+
- name: Install uv
89+
uses: astral-sh/setup-uv@v5
90+
91+
- name: Sync environment
92+
run: |
93+
uv sync
94+
95+
- name: Build and install beman-tidy
96+
run: |
97+
uv clean
98+
uv build
99+
python3 -m pip install dist/beman_tidy-0.1.0-py3-none-any.whl --force-reinstall
100+
beman-tidy --help
101+
102+
- name: Run installed beman-tidy on exemplar repo
103+
run: |
104+
git clone https://github.com/bemanproject/exemplar.git
105+
cd exemplar/ # Testing that beman-tidy can be run from any path, e.g. from the exemplar repo.
106+
beman-tidy --verbose --require-all .
107+
108+
create-issue-when-fault:
109+
needs: [run_linter, run_tests, build_and_install, run_on_exemplar]
110+
if: failure() && (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
111+
uses: ./.github/workflows/reusable-beman-create-issue-when-fault.yml
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2+
3+
name: 'Beman issue creation workflow'
4+
on:
5+
workflow_call:
6+
workflow_dispatch:
7+
jobs:
8+
create-issue:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# See https://github.com/cli/cli/issues/5075
12+
- uses: actions/checkout@v4
13+
- name: Create issue
14+
run: |
15+
issue_num=$(gh issue list -s open -S "[SCHEDULED-BUILD] infra repo CI job failure" -L 1 --json number | jq 'if length == 0 then -1 else .[0].number end')
16+
body="**CI job failure Report**
17+
- **Time of Failure**: $(date -u '+%B %d, %Y, %H:%M %Z')
18+
- **Commit**: [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
19+
- **Action Run**: [View logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
20+
The scheduled job triggered by cron has failed.
21+
Please investigate the logs and recent changes associated with this commit or rerun the workflow if you believe this is an error."
22+
if [[ $issue_num -eq -1 ]]; then
23+
gh issue create --repo ${{ github.repository }} --title "[SCHEDULED-BUILD] infra repo CI job failure" --body "$body" --assignee ${{ github.actor }}
24+
else
25+
gh issue comment --repo ${{ github.repository }} $issue_num --body "$body"
26+
fi
27+
env:
28+
GH_TOKEN: ${{ github.token }}

cookiecutter/{{cookiecutter.project_name}}/infra/LICENSE

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
==============================================================================
2-
The Beman Project is under the Apache License v2.0 with LLVM Exceptions:
3-
==============================================================================
41

52
Apache License
63
Version 2.0, January 2004
@@ -220,15 +217,3 @@ conflicts with the conditions of the GPLv2, you may retroactively and
220217
prospectively choose to deem waived or otherwise exclude such Section(s) of
221218
the License, but only in their entirety and only with respect to the Combined
222219
Software.
223-
224-
==============================================================================
225-
Software from third parties included in the Beman Project:
226-
==============================================================================
227-
The Beman Project contains third party software which is under different license
228-
terms. All such code will be identified clearly using at least one of two
229-
mechanisms:
230-
1) It will be in a separate directory tree with its own `LICENSE.txt` or
231-
`LICENSE` file at the top containing the specific license and restrictions
232-
which apply to that software, or
233-
2) It will contain specific license and restriction terms at the top of every
234-
file.

cookiecutter/{{cookiecutter.project_name}}/infra/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

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

5-
This repository contains the infrastructure for The Beman Project. This is NOT a library repository, so it does not
6-
respect the usual structure of a Beman library repository nor The Beman Standard!
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+
7+
This repository contains the infrastructure for The Beman Project. This is NOT a library repository,
8+
so it does not respect the usual structure of a Beman library repository nor The Beman Standard!
79

810
## Description
911

cookiecutter/{{cookiecutter.project_name}}/infra/tools/beman-tidy/README.md

Lines changed: 62 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
## Description
88

99
`beman-tidy` is a tool used to check and apply
10-
[The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_STANDARD.md).
10+
[The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md).
1111

1212
Purpose: The tool is used to `check` (`--dry-run`) and `apply` (`--fix-inplace`) the Beman Standard to a repository.
1313
Note: `2025-06-07`: In order to make the best and quickly use of the tool in the entire organization, most of the
@@ -67,7 +67,7 @@ options:
6767
--verbose, --no-verbose
6868
print verbose output for each check
6969
--require-all, --no-require-all
70-
all checks are required regardless of the check type (e.g., RECOMMENDATION becomes REQUIREMENT)
70+
all checks are required regardless of the check type (e.g., Recommendation becomes Requirement)
7171
--checks CHECKS array of checks to run
7272
```
7373
@@ -76,77 +76,98 @@ options:
7676
```shell
7777
# dry-run, require-all, non-verbose
7878
$ uv run beman-tidy /path/to/exemplar --require-all
79-
Summary REQUIREMENT: 1 checks PASSED, 0 checks FAILED, 4 skipped (NOT implemented).
80-
Summary RECOMMENDATION: 2 checks PASSED, 1 checks FAILED, 35 skipped (NOT implemented).
79+
Summary Requirement: 18 checks passed, 1 checks failed, 5 checks skipped, 23 checks not implemented.
80+
Summary Recommendation: 0 checks passed, 0 checks failed, 0 checks skipped, 0 checks not implemented.
8181
82-
Coverage REQUIREMENT: 100.0% (1/1 checks passed).
83-
Coverage RECOMMENDATION: 66.67% (2/3 checks passed).
82+
Coverage Requirement: 95.83% (23/24 checks passed).
83+
Coverage Recommendation: 0.00% (0/0 checks passed).
84+
Coverage TOTAL: 95.83% (23/24 checks passed).
8485
8586
# dry-run, non-require-all, non-verbose
86-
$ uv run beman-tidy /path/to/exemplar
87-
Summary REQUIREMENT: 1 checks PASSED, 0 checks FAILED, 4 skipped (NOT implemented).
88-
Summary RECOMMENDATION: 2 checks PASSED, 1 checks FAILED, 35 skipped (NOT implemented).
89-
90-
Coverage REQUIREMENT: 100.0% (1/1 checks passed).
91-
Note: RECOMMENDATIONs are not included (--require-all NOT set).
87+
Summary Requirement: 13 checks passed, 1 checks failed, 3 checks skipped, 9 checks not implemented.
88+
Summary Recommendation: 5 checks passed, 0 checks failed, 2 checks skipped, 14 checks not implemented.
9289
90+
Coverage Requirement: 66.67% (16/24 checks passed).
91+
Coverage Recommendation: 100.00% (7/7 checks passed).
92+
Coverage TOTAL: 74.19% (23/31 checks passed).
9393
```
9494
95-
or verbose mode:
95+
or verbose mode without errors:
9696
9797
```shell
9898
# dry-run, require-all, verbose mode - no errors
99-
$ uv run beman-tidy /path/to/exemplar --require-all --verbose
10099
beman-tidy pipeline started ...
101100
102-
Running check [RECOMMENDATION][README.TITLE] ...
103-
check [RECOMMENDATION][README.TITLE] ... PASSED
101+
Running check [Requirement][license.approved] ...
102+
[info ][license.approved ]: Valid Apache License - Version 2.0 with LLVM Exceptions found in LICENSE file.
103+
check [Requirement][license.approved] ... passed
104+
105+
Running check [Requirement][license.apache_llvm] ...
106+
check [Requirement][license.apache_llvm] ... passed
107+
108+
Running check [Requirement][license.criteria] ...
109+
[skipped ][license.criteria ]: beman-tidy cannot actually check license.criteria. Please ignore this message if license.approved has passed. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#licensecriteria for more information.
110+
Running check [Requirement][license.criteria] ... skipped
104111
105-
Running check [REQUIREMENT][README.BADGES] ...
106-
check [REQUIREMENT][README.BADGES] ... PASSED
112+
...
113+
114+
Running check [Requirement][readme.title] ...
115+
check [Requirement][readme.title] ... passed
107116
108-
Running check [RECOMMENDATION][README.LIBRARY_STATUS] ...
109-
check [RECOMMENDATION][README.LIBRARY_STATUS] ... PASSED
117+
Running check [Requirement][readme.badges] ...
118+
check [Requirement][readme.badges] ... passed
110119
111-
Running check [RECOMMENDATION][DIRECTORY.SOURCES] ...
112-
[WARNING ][DIRECTORY.SOURCES ]: The directory '/Users/dariusn/dev/dn/git/Beman/exemplar/src/beman/exemplar' does not exist.
113-
check [RECOMMENDATION][DIRECTORY.SOURCES] ... FAILED
120+
Running check [Requirement][readme.implements] ...
121+
check [Requirement][readme.implements] ... passed
114122
123+
...
115124
116125
beman-tidy pipeline finished.
117126
118-
Summary REQUIREMENT: 1 checks PASSED, 0 checks FAILED, 4 skipped (NOT implemented).
119-
Summary RECOMMENDATION: 2 checks PASSED, 1 checks FAILED, 35 skipped (NOT implemented).
127+
Summary Requirement: 19 checks passed, 0 checks failed, 3 checks skipped, 23 checks not implemented.
128+
Summary Recommendation: 0 checks passed, 0 checks failed, 2 checks skipped, 0 checks not implemented.
120129
121-
Coverage REQUIREMENT: 100.0% (1/1 checks passed).
122-
Coverage RECOMMENDATION: 66.67% (2/3 checks passed).
130+
Coverage Requirement: 100.00% (24/24 checks passed).
131+
Coverage Recommendation: 0.00% (0/0 checks passed).
132+
Coverage TOTAL: 100.00% (24/24 checks passed).
123133
```
124134
135+
or verbose mode with errors:
136+
125137
```shell
126-
# dry-run, require-all, verbose mode - no errors
127-
$ uv run beman-tidy /path/to/exemplar --require-all --verbose
138+
# dry-run, require-all, verbose mode - with errors
128139
beman-tidy pipeline started ...
129140
130-
Running check [RECOMMENDATION][README.TITLE] ...
131-
check [RECOMMENDATION][README.TITLE] ... PASSED
141+
Running check [Requirement][license.approved] ...
142+
[info ][license.approved ]: Valid Apache License - Version 2.0 with LLVM Exceptions found in LICENSE file.
143+
check [Requirement][license.approved] ... passed
144+
145+
Running check [Requirement][license.apache_llvm] ...
146+
check [Requirement][license.apache_llvm] ... passed
132147
133-
Running check [REQUIREMENT][README.BADGES] ...
134-
check [REQUIREMENT][README.BADGES] ... PASSED
148+
Running check [Requirement][license.criteria] ...
149+
[skipped ][license.criteria ]: beman-tidy cannot actually check license.criteria. Please ignore this message if license.approved has passed. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#licensecriteria for more information.
150+
Running check [Requirement][license.criteria] ... skipped
135151
136-
Running check [RECOMMENDATION][README.LIBRARY_STATUS] ...
137-
check [RECOMMENDATION][README.LIBRARY_STATUS] ... PASSED
152+
...
153+
154+
Running check [Requirement][readme.implements] ...
155+
check [Requirement][readme.implements] ... passed
138156
139-
Running check [RECOMMENDATION][DIRECTORY.SOURCES] ...
140-
check [RECOMMENDATION][DIRECTORY.SOURCES] ... PASSED
157+
Running check [Requirement][readme.library_status] ...
158+
[error ][readme.library_status ]: The file '/Users/dariusn/dev/dn/git/Beman/exemplar/README.md' does not contain exactly one of the required statuses from ['**Status**: [Under development and not yet ready for production use.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#under-development-and-not-yet-ready-for-production-use)', '**Status**: [Production ready. API may undergo changes.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#production-ready-api-may-undergo-changes)', '**Status**: [Production ready. Stable API.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#production-ready-stable-api)', '**Status**: [Retired. No longer maintained or actively developed.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#retired-no-longer-maintained-or-actively-developed)']
159+
check [Requirement][readme.library_status] ... failed
141160
161+
...
142162
143163
beman-tidy pipeline finished.
144164
145-
Summary REQUIREMENT: 1 checks PASSED, 0 checks FAILED, 4 skipped (NOT implemented).
146-
Summary RECOMMENDATION: 3 checks PASSED, 0 checks FAILED, 35 skipped (NOT implemented).
165+
Summary Requirement: 18 checks passed, 1 checks failed, 3 checks skipped, 23 checks not implemented.
166+
Summary Recommendation: 0 checks passed, 0 checks failed, 2 checks skipped, 0 checks not implemented.
147167
148-
Coverage REQUIREMENT: 100.0% (1/1 checks passed).
149-
Coverage RECOMMENDATION: 100.0% (3/3 checks passed).
168+
Coverage Requirement: 95.83% (23/24 checks passed).
169+
Coverage Recommendation: 0.00% (0/0 checks passed).
170+
Coverage TOTAL: 95.83% (23/24 checks passed).
150171
```
151172
152173
- Run beman-tidy on the exemplar repository (fix issues in-place):

0 commit comments

Comments
 (0)