Skip to content

Commit f8424ca

Browse files
Trigger CI for leanprover/lean4#8405
2 parents 5ab2b23 + 59c6079 commit f8424ca

File tree

1,633 files changed

+21638
-12034
lines changed

Some content is hidden

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

1,633 files changed

+21638
-12034
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "Mathlib4 dev container",
33

4-
"build": {
5-
"dockerfile": "Dockerfile"
6-
},
4+
"image": "ghcr.io/leanprover-community/mathlib4/gitpod",
75

86
"onCreateCommand": "lake exe cache get!",
97

.github/build.in.yml

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -286,54 +286,10 @@ jobs:
286286
name: Lint styleJOB_NAME
287287
runs-on: ubuntu-latest
288288
steps:
289-
- name: cleanup
290-
run: |
291-
find . -name . -o -prune -exec rm -rf -- {} +
292-
293-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
294-
295-
# Run the case checker action
296-
- name: Check Case Sensitivity
297-
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
298-
299-
- name: Look for ignored files
300-
uses: credfeto/action-no-ignored-files@4fccae50720d89bef0cd9dc99a85a19b765d2e70 # v1.2.0
301-
302-
- name: "Check for Lean files with the executable bit set"
303-
shell: bash
304-
run: |
305-
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))"
306-
if [[ -n "$executable_files" ]]
307-
then
308-
echo "ERROR: The following Lean files have the executable bit set."
309-
echo "$executable_files"
310-
exit 1
311-
fi
312-
313-
- name: install Python
314-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
289+
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
315290
with:
316-
python-version: 3.8
317-
318-
- name: Configure Lean
319-
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
320-
with:
321-
auto-config: false
322-
use-github-cache: false
323-
use-mathlib-cache: false
324-
325-
- name: "run style linters"
326-
run: |
327-
lake exe lint-style
328-
329-
- name: Install bibtool
330-
run: |
331-
sudo apt-get update
332-
sudo apt-get install -y bibtool
333-
334-
- name: lint references.bib
335-
run: |
336-
./scripts/lint-bib.sh
291+
mode: check
292+
lint-bib-file: true
337293

338294
final:
339295
name: Post-CI jobJOB_NAME

.github/workflows/bors.yml

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -296,54 +296,10 @@ jobs:
296296
name: Lint style
297297
runs-on: ubuntu-latest
298298
steps:
299-
- name: cleanup
300-
run: |
301-
find . -name . -o -prune -exec rm -rf -- {} +
302-
303-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
304-
305-
# Run the case checker action
306-
- name: Check Case Sensitivity
307-
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
308-
309-
- name: Look for ignored files
310-
uses: credfeto/action-no-ignored-files@4fccae50720d89bef0cd9dc99a85a19b765d2e70 # v1.2.0
311-
312-
- name: "Check for Lean files with the executable bit set"
313-
shell: bash
314-
run: |
315-
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))"
316-
if [[ -n "$executable_files" ]]
317-
then
318-
echo "ERROR: The following Lean files have the executable bit set."
319-
echo "$executable_files"
320-
exit 1
321-
fi
322-
323-
- name: install Python
324-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
299+
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
325300
with:
326-
python-version: 3.8
327-
328-
- name: Configure Lean
329-
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
330-
with:
331-
auto-config: false
332-
use-github-cache: false
333-
use-mathlib-cache: false
334-
335-
- name: "run style linters"
336-
run: |
337-
lake exe lint-style
338-
339-
- name: Install bibtool
340-
run: |
341-
sudo apt-get update
342-
sudo apt-get install -y bibtool
343-
344-
- name: lint references.bib
345-
run: |
346-
./scripts/lint-bib.sh
301+
mode: check
302+
lint-bib-file: true
347303

348304
final:
349305
name: Post-CI job

.github/workflows/bot_fix_style.yaml

Lines changed: 4 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -27,136 +27,8 @@ jobs:
2727
# && (startsWith(github.event.comment.body, 'bot fix style') || contains(toJSON(github.event.comment.body), '\nbot fix style'))
2828
runs-on: ubuntu-latest
2929
steps:
30-
- name: Find bot fix style
31-
id: bot_fix_style
32-
run: |
33-
COMMENT="${COMMENT_EVENT}${COMMENT_REVIEW}${COMMENT_REVIEW_COMMENT}"
34-
# we strip `\r` since line endings from GitHub contain this character
35-
COMMENT="${COMMENT//$'\r'/}"
36-
# for debugging, we print some information
37-
printf '%s' "${COMMENT}" | hexdump -cC
38-
printf 'Comment:"%s"\n' "${COMMENT}"
39-
bot_fix_style="$(printf '%s' "${COMMENT}" |
40-
sed -n 's=^bot fix style$=bot-fix-style=p' | head -1)"
41-
42-
printf $'"bot fix style"? \'%s\'\n' "${bot_fix_style}"
43-
printf $'AUTHOR: \'%s\'\n' "${AUTHOR}"
44-
printf $'PR_NUMBER: \'%s\'\n' "${{ github.event.issue.number }}${{ github.event.pull_request.number }}"
45-
printf $'%s' "${{ github.event.issue.number }}${{ github.event.pull_request.number }}" | hexdump -cC
46-
47-
printf $'bot_fix_style=%s\n' "${bot_fix_style}" >> "${GITHUB_OUTPUT}"
48-
# these final variables are probably not relevant for the bot_fix_style action
49-
if [ "${AUTHOR}" == 'leanprover-community-mathlib4-bot' ] ||
50-
[ "${AUTHOR}" == 'leanprover-community-bot-assistant' ]
51-
then
52-
printf $'bot=true\n'
53-
printf $'bot=true\n' >> "${GITHUB_OUTPUT}"
54-
else
55-
printf $'bot=false\n'
56-
printf $'bot=false\n' >> "${GITHUB_OUTPUT}"
57-
fi
58-
59-
- id: user_permission
60-
if: steps.bot_fix_style.outputs.bot_fix_style == 'bot-fix-style'
61-
uses: actions-cool/check-user-permission@7b90a27f92f3961b368376107661682c441f6103 # v2.3.0
62-
with:
63-
require: 'write'
64-
65-
# from now on, it is sufficient to just check `user_permission`:
66-
# if the comment did not contain `bot fix style`,
67-
# then `user_permission` would not have ran
68-
- name: Add reaction (comment)
69-
# reactions are only supported for `comment`s and `review_comment`s?
70-
# This action only runs on `comment`s rather than `review`s or `review_comment`s
71-
# Is the `id` check a good way to check that this is a `comment`?
72-
if: ${{ steps.user_permission.outputs.require-result == 'true' &&
73-
! github.event.comment.id == '' }}
74-
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
75-
with:
76-
comment-id: ${{ github.event.comment.id }}
77-
reactions: rocket
78-
79-
- name: Add reaction (review comment)
80-
# this action only runs on `review_comment`s
81-
# is the `id` check a good way to check that this is a `review_comment`?
82-
if: ${{ steps.user_permission.outputs.require-result == 'true' &&
83-
! github.event.pull_request_review_comment.id == '' }}
84-
run: |
85-
gh api --method POST \
86-
-H "Accept: application/vnd.github+json" \
87-
-H "X-GitHub-Api-Version: 2022-11-28" \
88-
/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/comments/${{ github.event.comment.id }}/reactions \
89-
-f "content=rocket"
90-
env:
91-
GH_TOKEN: ${{ secrets.BOT_FIX_STYLE_TOKEN }}
92-
93-
- name: cleanup
94-
if: steps.user_permission.outputs.require-result == 'true'
95-
run: |
96-
find . -name . -o -prune -exec rm -rf -- {} +
97-
98-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99-
if: steps.user_permission.outputs.require-result == 'true'
100-
with:
101-
token: ${{ secrets.BOT_FIX_STYLE_TOKEN }}
102-
103-
- name: Checkout PR branch
104-
if: steps.user_permission.outputs.require-result == 'true'
105-
run: |
106-
# covers `comment`s
107-
gh pr checkout ${{ github.event.issue.number }} ||
108-
# covers `review`s and `review_comment`s
109-
gh pr checkout ${{ github.event.pull_request.number }}
110-
env:
111-
GH_TOKEN: ${{ secrets.BOT_FIX_STYLE_TOKEN }}
112-
113-
- name: install Python
114-
if: steps.user_permission.outputs.require-result == 'true'
115-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
30+
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
11631
with:
117-
python-version: 3.8
118-
119-
- name: Configure Lean
120-
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
121-
with:
122-
auto-config: false
123-
use-github-cache: false
124-
use-mathlib-cache: false
125-
126-
# run the same linting steps as in lint_and_suggest_pr.yaml
127-
128-
- name: lint
129-
if: steps.user_permission.outputs.require-result == 'true'
130-
run: |
131-
lake exe lint-style --fix
132-
133-
- name: Install bibtool
134-
if: steps.user_permission.outputs.require-result == 'true'
135-
run: |
136-
sudo apt-get update
137-
sudo apt-get install -y bibtool
138-
139-
- name: lint references.bib
140-
if: steps.user_permission.outputs.require-result == 'true'
141-
run: |
142-
# ignoring the return code allows the following `reviewdog` step to add GitHub suggestions
143-
./scripts/lint-bib.sh || true
144-
145-
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
146-
if: steps.user_permission.outputs.require-result == 'true'
147-
run: |
148-
# ignoring the return code allows the following `reviewdog` step to add GitHub suggestions
149-
lake exe mk_all || true
150-
151-
- name: Commit and push changes
152-
if: steps.user_permission.outputs.require-result == 'true'
153-
run: |
154-
# cleanup junk from build
155-
rm docs/references.bib.old
156-
# setup commit and push
157-
git config user.name "leanprover-community-mathlib4-bot"
158-
git config user.email "[email protected]"
159-
git add .
160-
# Don't fail if there's nothing to commit
161-
git commit -m "commit changes from style linters" || true
162-
git push origin HEAD
32+
mode: fix
33+
lint-bib-file: true
34+
bot-fix-style-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -303,54 +303,10 @@ jobs:
303303
name: Lint style
304304
runs-on: ubuntu-latest
305305
steps:
306-
- name: cleanup
307-
run: |
308-
find . -name . -o -prune -exec rm -rf -- {} +
309-
310-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
311-
312-
# Run the case checker action
313-
- name: Check Case Sensitivity
314-
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
315-
316-
- name: Look for ignored files
317-
uses: credfeto/action-no-ignored-files@4fccae50720d89bef0cd9dc99a85a19b765d2e70 # v1.2.0
318-
319-
- name: "Check for Lean files with the executable bit set"
320-
shell: bash
321-
run: |
322-
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))"
323-
if [[ -n "$executable_files" ]]
324-
then
325-
echo "ERROR: The following Lean files have the executable bit set."
326-
echo "$executable_files"
327-
exit 1
328-
fi
329-
330-
- name: install Python
331-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
306+
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
332307
with:
333-
python-version: 3.8
334-
335-
- name: Configure Lean
336-
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
337-
with:
338-
auto-config: false
339-
use-github-cache: false
340-
use-mathlib-cache: false
341-
342-
- name: "run style linters"
343-
run: |
344-
lake exe lint-style
345-
346-
- name: Install bibtool
347-
run: |
348-
sudo apt-get update
349-
sudo apt-get install -y bibtool
350-
351-
- name: lint references.bib
352-
run: |
353-
./scripts/lint-bib.sh
308+
mode: check
309+
lint-bib-file: true
354310

355311
final:
356312
name: Post-CI job

.github/workflows/build_fork.yml

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -300,54 +300,10 @@ jobs:
300300
name: Lint style (fork)
301301
runs-on: ubuntu-latest
302302
steps:
303-
- name: cleanup
304-
run: |
305-
find . -name . -o -prune -exec rm -rf -- {} +
306-
307-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
308-
309-
# Run the case checker action
310-
- name: Check Case Sensitivity
311-
uses: credfeto/action-case-checker@cb652aeab29ed363bbdb7d9ee1bfcc010c46cac5 # v1.3.0
312-
313-
- name: Look for ignored files
314-
uses: credfeto/action-no-ignored-files@4fccae50720d89bef0cd9dc99a85a19b765d2e70 # v1.2.0
315-
316-
- name: "Check for Lean files with the executable bit set"
317-
shell: bash
318-
run: |
319-
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))"
320-
if [[ -n "$executable_files" ]]
321-
then
322-
echo "ERROR: The following Lean files have the executable bit set."
323-
echo "$executable_files"
324-
exit 1
325-
fi
326-
327-
- name: install Python
328-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
303+
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
329304
with:
330-
python-version: 3.8
331-
332-
- name: Configure Lean
333-
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
334-
with:
335-
auto-config: false
336-
use-github-cache: false
337-
use-mathlib-cache: false
338-
339-
- name: "run style linters"
340-
run: |
341-
lake exe lint-style
342-
343-
- name: Install bibtool
344-
run: |
345-
sudo apt-get update
346-
sudo apt-get install -y bibtool
347-
348-
- name: lint references.bib
349-
run: |
350-
./scripts/lint-bib.sh
305+
mode: check
306+
lint-bib-file: true
351307

352308
final:
353309
name: Post-CI job (fork)

0 commit comments

Comments
 (0)