Skip to content

Commit cbdbff6

Browse files
Merge branch 'master' into delab_isFoo_of
2 parents 86abc6b + 20b873c commit cbdbff6

File tree

6,067 files changed

+163386
-74363
lines changed

Some content is hidden

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

6,067 files changed

+163386
-74363
lines changed

.docker/gitpod-blueprint/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FROM ubuntu:jammy
1010
USER root
1111

1212
ENV DEBIAN_FRONTEND=noninteractive
13-
RUN apt-get update && apt-get install sudo git curl git bash-completion texlive texlive-xetex latexmk graphviz graphviz-dev python3 python3-pip python3-requests -y && apt-get clean
13+
RUN apt-get update && apt-get install sudo git curl git bash-completion texlive texlive-xetex latexmk graphviz graphviz-dev tzdata python3 python3-pip python3-requests -y && apt-get clean
1414

1515
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
1616
# passwordless sudo for users in the 'sudo' group

.docker/gitpod/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FROM ubuntu:jammy
99
USER root
1010

1111
ENV DEBIAN_FRONTEND=noninteractive
12-
RUN apt-get update && apt-get install sudo git curl git bash-completion python3 python3-pip python3-requests -y && apt-get clean
12+
RUN apt-get update && apt-get install sudo git curl git tzdata bash-completion python3 python3-pip python3-requests -y && apt-get clean
1313

1414
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
1515
# passwordless sudo for users in the 'sudo' group

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11

22
---
3-
<!-- The text above the `---` will become the commit message when your
4-
PR is merged. Please leave a blank newline before the `---`, otherwise
5-
GitHub will format the text above it as a title.
3+
<!-- Your PR title will become the first line of the commit message.
4+
5+
In this box, the text above the `---` (if not empty) will be appended
6+
to the commit message, and can be used to give additional context or
7+
details. Please leave a blank newline before the `---`, otherwise GitHub
8+
will format the text above it as a title.
69
710
For details on the "pull request lifecycle" in mathlib, please see:
811
https://leanprover-community.github.io/contribute/index.html

.github/actionlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ self-hosted-runner:
33
- bors
44
- pr
55
- doc-gen
6+
- lean4checker

.github/build.in.yml

Lines changed: 74 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

7979
# Checkout the master branch into a subdirectory
8080
- name: Checkout master branch
81-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
81+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
8282
with:
8383
# Recall that on the `leanprover-community/mathlib4-nightly-testing` repository,
8484
# we don't maintain a `master` branch at all.
@@ -88,7 +88,7 @@ jobs:
8888

8989
# Checkout the PR branch into a subdirectory
9090
- name: Checkout PR branch
91-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
91+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9292
with:
9393
ref: "${{ PR_BRANCH_REF }}"
9494
path: pr-branch
@@ -223,7 +223,7 @@ jobs:
223223
224224
# Extract all inputRevs from the manifest
225225
invalid_revs=$(jq -r '.packages[].inputRev // empty' lake-manifest.json | \
226-
grep -v -E '^(main|master|v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?)$' || true)
226+
grep -v -E '^(main|master|v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?)$' || true)
227227
228228
if [ -n "$invalid_revs" ]; then
229229
echo "❌ Error: Found invalid inputRevs in lake-manifest.json:"
@@ -232,7 +232,7 @@ jobs:
232232
echo "All inputRevs must be one of:"
233233
echo " - 'main'"
234234
echo " - 'master'"
235-
echo " - 'vX.Y.Z' (semantic version, e.g., v1.2.3 or v1.2.3-pre)"
235+
echo " - 'vX.Y.Z' (semantic version, e.g., v1.2.3, v1.2.3-pre, or v1.2.3+build)"
236236
exit 1
237237
else
238238
echo "✅ All inputRevs in lake-manifest.json are valid"
@@ -365,7 +365,7 @@ jobs:
365365
366366
- name: upload artifact containing contents of pr-branch
367367
# temporary measure for debugging no-build failures
368-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
368+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
369369
with:
370370
name: mathlib4_artifact
371371
include-hidden-files: true
@@ -395,7 +395,7 @@ jobs:
395395
# do not try to upload files just downloaded
396396
397397
echo "Uploading cache to Azure..."
398-
USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked
398+
MATHLIB_CACHE_USE_CLOUDFLARE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked
399399
env:
400400
MATHLIB_CACHE_SAS_RAW: ${{ secrets.MATHLIB_CACHE_SAS }}
401401

@@ -451,8 +451,8 @@ jobs:
451451
export MATHLIB_CACHE_SAS="${MATHLIB_CACHE_SAS_RAW%"${MATHLIB_CACHE_SAS_RAW##*[![:space:]]}"}"
452452
453453
echo "Uploading Archive and Counterexamples cache to Azure..."
454-
USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked Archive.lean
455-
USE_FRO_CACHE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked Counterexamples.lean
454+
MATHLIB_CACHE_USE_CLOUDFLARE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked Archive.lean
455+
MATHLIB_CACHE_USE_CLOUDFLARE=0 ../master-branch/.lake/build/bin/cache --repo=${{ github.event.pull_request.head.repo.full_name || github.repository }} put-unpacked Counterexamples.lean
456456
env:
457457
MATHLIB_CACHE_SAS_RAW: ${{ secrets.MATHLIB_CACHE_SAS }}
458458

@@ -496,12 +496,64 @@ jobs:
496496
# cd pr-branch
497497
# env LEAN_ABORT_ON_PANIC=1 lake exe shake --gh-style
498498

499+
- name: kill stray runLinter processes
500+
if: ${{ always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure' }}
501+
continue-on-error: true
502+
shell: bash
503+
run: |
504+
echo "Checking for runLinter processes..."
505+
if ps -eo pid,lstart,command | grep -F runLinter | grep -v grep; then
506+
echo "Killing runLinter processes..."
507+
pkill -f runLinter || true
508+
else
509+
echo "No stray runLinter processes found."
510+
fi
511+
499512
- name: lint mathlib
500513
if: ${{ always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure' }}
501514
id: lint
515+
timeout-minutes: 40
502516
run: |
503517
cd pr-branch
504-
env LEAN_ABORT_ON_PANIC=1 ../master-branch/scripts/lake-build-wrapper.py .lake/build_summary_lint.json lake exe runLinter Mathlib
518+
set -o pipefail
519+
# Try running with --trace; if it fails due to argument parsing, the PR needs to merge master
520+
# We use .lake/ for the output file because landrun restricts /tmp access
521+
for attempt in 1 2; do
522+
if timeout 15m env LEAN_ABORT_ON_PANIC=1 stdbuf -oL lake exe runLinter --trace Mathlib 2>&1 | tee ".lake/lint_output_attempt_${attempt}.txt"; then
523+
break
524+
fi
525+
status=${PIPESTATUS[0]}
526+
if grep -q "cannot parse arguments" ".lake/lint_output_attempt_${attempt}.txt"; then
527+
echo ""
528+
echo "=============================================================================="
529+
echo "ERROR: Your branch uses an older version of runLinter that doesn't support"
530+
echo "the --trace flag. Please merge 'master' into your PR branch to get the"
531+
echo "updated linter, then push again."
532+
echo ""
533+
echo "You can do this with:"
534+
echo " git fetch upstream"
535+
echo " git merge upstream/master"
536+
echo " git push"
537+
echo "=============================================================================="
538+
echo ""
539+
exit 1
540+
fi
541+
if [ "$status" -eq 124 ]; then
542+
echo "runLinter timed out (attempt $attempt)."
543+
if [ "$attempt" -lt 2 ]; then
544+
echo "Checking for runLinter processes..."
545+
if ps -eo pid,lstart,command | grep -F runLinter | grep -v grep; then
546+
echo "Killing runLinter processes..."
547+
pkill -f runLinter || true
548+
else
549+
echo "No stray runLinter processes found."
550+
fi
551+
echo "Retrying runLinter after timeout..."
552+
continue
553+
fi
554+
fi
555+
exit $status
556+
done
505557
506558
- name: end gh-problem-match-wrap for shake and lint steps
507559
uses: leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23
@@ -527,6 +579,15 @@ jobs:
527579
exit 1
528580
fi
529581
582+
- name: list stray runLinter processes
583+
shell: bash
584+
if: always()
585+
run: |
586+
echo "Checking for runLinter processes..."
587+
if ! ps -eo pid,lstart,command | grep -F runLinter | grep -v grep; then
588+
echo "No stray runLinter processes found."
589+
fi
590+
530591
- name: Post comments for lean-pr-testing-NNNN and batteries-pr-testing-NNNN branches
531592
if: always()
532593
shell: bash
@@ -552,7 +613,7 @@ jobs:
552613
runs-on: ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
553614
steps:
554615

555-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
616+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
556617
with:
557618
ref: "${{ PR_BRANCH_REF }}"
558619

@@ -600,7 +661,7 @@ jobs:
600661
lake exe graph
601662
602663
- name: upload the import graph
603-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
664+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
604665
with:
605666
name: import-graph
606667
path: import_graph.dot
@@ -624,34 +685,7 @@ jobs:
624685
lake build AesopTest
625686
626687
# We no longer run `lean4checker` in regular CI, as it is quite expensive for little benefit.
627-
# Instead we run it in a cron job on master: see `lean4checker.yml`.
628-
# Output is posted to the zulip topic
629-
# https://leanprover.zulipchat.com/#narrow/stream/345428-mathlib-reviewers/topic/lean4checker
630-
631-
- name: checkout lean4checker
632-
if: ${{ (always() && needs.build.outputs.build-outcome == 'success' || needs.build.outputs.build-outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
633-
shell: bash
634-
run: |
635-
git clone https://github.com/leanprover/lean4checker
636-
cd lean4checker
637-
# Read lean-toolchain file and checkout appropriate branch
638-
TOOLCHAIN=$(cat ../lean-toolchain)
639-
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
640-
VERSION=${TOOLCHAIN#leanprover/lean4:}
641-
git checkout "$VERSION"
642-
else
643-
git checkout master
644-
fi
645-
646-
- name: run leanchecker on itself
647-
if: ${{ (always() && needs.build.outputs.build-outcome == 'success' || needs.build.outputs.build-outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
648-
run: |
649-
cd lean4checker
650-
# Build lean4checker using the same toolchain
651-
cp ../lean-toolchain .
652-
lake build
653-
lake -q exe lean4checker Lean4Checker
654-
688+
# Instead we run it in a cron job on master: see `daily.yml`.
655689
style_lint:
656690
name: Lint styleJOB_NAME
657691
if: FORK_CONDITION
@@ -688,15 +722,6 @@ jobs:
688722
echo "number=${{ steps.PR_from_push.outputs.number || github.event.pull_request.number }}" | tee -a "$GITHUB_OUTPUT"
689723
echo "pr_labels=${{ steps.PR_from_push.outputs.pr_labels || join(github.event.pull_request.labels.*.name, ',') }}" | tee -a "$GITHUB_OUTPUT"
690724
691-
- if: contains(steps.PR.outputs.pr_labels, 'bench-after-CI')
692-
name: If `bench-after-CI` is present, add a `!bench` comment.
693-
uses: GrantBirki/comment@608e41b19bc973020ec0e189ebfdae935d7fe0cc # v2.1.1
694-
with:
695-
token: ${{ secrets.AUTO_MERGE_TOKEN }}
696-
issue-number: ${{ steps.PR.outputs.number }}
697-
body: |
698-
!bench
699-
700725
- id: remove_labels
701726
name: Remove "awaiting-CI"
702727
# we use curl rather than octokit/request-action so that the job won't fail
@@ -713,7 +738,7 @@ jobs:
713738
# unfortunately we cannot query only for 'auto-merge-after-CI' events
714739
# so we have to process this with jq in the next step
715740
id: get-timeline
716-
uses: octokit/graphql-action@8ad880e4d437783ea2ab17010324de1075228110 # v2.3.2
741+
uses: octokit/graphql-action@ddde8ebb2493e79f390e6449c725c21663a67505 # v3.0.2
717742
with:
718743
query: |
719744
query($owner: String!, $name: String!, $number: Int!) {

.github/workflows/PR_summary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2121
with:
2222
ref: ${{ github.event.pull_request.head.sha }}
2323
fetch-depth: 0
2424
path: pr-branch
2525

2626
# Checkout the master branch into a subdirectory
2727
- name: Checkout master branch
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2929
with:
3030
# When testing the scripts, comment out the "ref: master"
3131
ref: master
@@ -60,7 +60,7 @@ jobs:
6060
fi
6161
6262
- name: Set up Python
63-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
63+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
6464
with:
6565
python-version: 3.12
6666

.github/workflows/actionlint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
13+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1414

1515
- name: suggester / actionlint
16-
uses: reviewdog/action-actionlint@f00ad0691526c10be4021a91b2510f0a769b14d0 # v1.68.0
16+
uses: reviewdog/action-actionlint@83e4ed25b168066ad8f62f5afbb29ebd8641d982 # v1.69.1
1717
with:
1818
tool_name: actionlint
1919
fail_level: error
@@ -22,7 +22,7 @@ jobs:
2222
name: check workflows generated by build.in.yml
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2626

2727
- name: update workflows
2828
run: |

.github/workflows/add_label_from_diff.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
if: github.repository == 'leanprover-community/mathlib4'
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2626
with:
2727
ref: ${{ github.event.pull_request.head.sha }}
2828
fetch-depth: 0

.github/workflows/auto_assign_reviewers.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
name: assign automatically proposed reviewers
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1515
with:
1616
ref: master
1717
sparse-checkout: |
1818
scripts/assign_reviewers.py
1919
2020
- name: Set up Python
21-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
21+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2222
with:
2323
python-version: '3.x'
2424

.github/workflows/bench_summary_comment.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)