Skip to content

Commit

Permalink
Merge branch 'master' into MR-shell-strict-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
grunweg committed Oct 31, 2024
2 parents c26e436 + 348232e commit 98cf94b
Show file tree
Hide file tree
Showing 3,080 changed files with 80,882 additions and 41,181 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/build.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: credfeto/[email protected]

- name: Look for ignored files
uses: credfeto/action-no-ignored-files@v1.1.0
uses: credfeto/action-no-ignored-files@v1.2.0

- name: "Check for Lean files with the executable bit set"
shell: bash
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
# The Hoskinson runners may not have jq installed, so do that now.
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v1.0.1
uses: dcarbone/install-jq-action@v2.1.0

- name: install elan
run: |
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
- uses: actions/checkout@v4

- id: PR
uses: 8BitJonny/gh-get-current-pr@2.2.0
uses: 8BitJonny/gh-get-current-pr@3.0.0
# TODO: this may not work properly if the same commit is pushed to multiple branches:
# https://github.com/8BitJonny/gh-get-current-pr/issues/8
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2 # Specifies the version of the Dependabot configuration file format

updates:
# Configuration for dependency updates
- package-ecosystem: "github-actions" # Specifies the ecosystem to check for updates
directory: "/" # Specifies the directory to check for dependencies; "/" means the root directory
schedule:
# Check for updates to GitHub Actions every month
interval: "monthly"
35 changes: 35 additions & 0 deletions .github/workflows/bench_summary_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Bench output summary

on:
issue_comment:
types: created

jobs:
Produce_bench_summary:
name: Post summary of benchmarking results
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'Here are the [benchmark results]'))
runs-on: ubuntu-latest
steps:
- name: install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}"
- uses: actions/checkout@v4
with:
ref: master
sparse-checkout: |
scripts/bench_summary.lean
- name: Summarize bench output
run: |
{
cat scripts/bench_summary.lean
printf $'run_cmd BenchAction.addBenchSummaryComment %s "leanprover-community/mathlib4"' "${PR}"
} |
lake env lean --stdin
env:
PR: ${{ github.event.issue.number }}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
6 changes: 3 additions & 3 deletions .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: credfeto/[email protected]

- name: Look for ignored files
uses: credfeto/action-no-ignored-files@v1.1.0
uses: credfeto/action-no-ignored-files@v1.2.0

- name: "Check for Lean files with the executable bit set"
shell: bash
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
# The Hoskinson runners may not have jq installed, so do that now.
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v1.0.1
uses: dcarbone/install-jq-action@v2.1.0

- name: install elan
run: |
Expand Down Expand Up @@ -313,7 +313,7 @@ jobs:
- uses: actions/checkout@v4

- id: PR
uses: 8BitJonny/gh-get-current-pr@2.2.0
uses: 8BitJonny/gh-get-current-pr@3.0.0
# TODO: this may not work properly if the same commit is pushed to multiple branches:
# https://github.com/8BitJonny/gh-get-current-pr/issues/8
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bot_fix_style_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: install Python
if: steps.user_permission.outputs.require-result == 'true'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bot_fix_style_review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: install Python
if: steps.user_permission.outputs.require-result == 'true'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bot_fix_style_review_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: install Python
if: steps.user_permission.outputs.require-result == 'true'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: credfeto/[email protected]

- name: Look for ignored files
uses: credfeto/action-no-ignored-files@v1.1.0
uses: credfeto/action-no-ignored-files@v1.2.0

- name: "Check for Lean files with the executable bit set"
shell: bash
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
# The Hoskinson runners may not have jq installed, so do that now.
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v1.0.1
uses: dcarbone/install-jq-action@v2.1.0

- name: install elan
run: |
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
- uses: actions/checkout@v4

- id: PR
uses: 8BitJonny/gh-get-current-pr@2.2.0
uses: 8BitJonny/gh-get-current-pr@3.0.0
# TODO: this may not work properly if the same commit is pushed to multiple branches:
# https://github.com/8BitJonny/gh-get-current-pr/issues/8
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: credfeto/[email protected]

- name: Look for ignored files
uses: credfeto/action-no-ignored-files@v1.1.0
uses: credfeto/action-no-ignored-files@v1.2.0

- name: "Check for Lean files with the executable bit set"
shell: bash
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
# The Hoskinson runners may not have jq installed, so do that now.
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v1.0.1
uses: dcarbone/install-jq-action@v2.1.0

- name: install elan
run: |
Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:
- uses: actions/checkout@v4

- id: PR
uses: 8BitJonny/gh-get-current-pr@2.2.0
uses: 8BitJonny/gh-get-current-pr@3.0.0
# TODO: this may not work properly if the same commit is pushed to multiple branches:
# https://github.com/8BitJonny/gh-get-current-pr/issues/8
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependent-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
# timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.11.0
- uses: styfle/cancel-workflow-action@0.12.1
with:
all_but_latest: true
access_token: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels_from_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Add label based on comment
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/lean4checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# The Hoskinson runners may not have jq installed, so do that now.
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v1.0.1
uses: dcarbone/install-jq-action@v2.1.0

- name: install elan
run: |
Expand Down Expand Up @@ -70,21 +70,19 @@ jobs:
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
git checkout v4.12.0-rc1
# This should be changed back to a version tag when
# anything subsequent to `v4.13.0-rc3` is released.
git checkout master
# Now that the git hash is embedded in each olean,
# we need to compile lean4checker on the same toolchain
cp ../lean-toolchain .
lake build
./test.sh
cd ..
lake env lean4checker/.lake/build/bin/lean4checker
- id: ci_url
run: |
url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
curl -s "${url}" |
# extract the CI run number from the unique line that matches ` href=".../job/[job number]"`
awk -v url="${url}" -F'/' '/^ *href/ {gsub(/"/, "", $NF); printf("summary<<EOF\n%s/job/%s\nEOF", url, $NF)}' >> "$GITHUB_OUTPUT"
# After https://github.com/leanprover/lean4checker/pull/26
# lean4checker by default only runs on the current project
# so we explicitly check Batteries as well here.
lake env lean4checker/.lake/build/bin/lean4checker Batteries Mathlib
- name: Post success message on Zulip
if: success()
Expand All @@ -97,7 +95,7 @@ jobs:
type: 'stream'
topic: 'lean4checker'
content: |
✅ lean4checker [succeeded](${{ steps.ci_url.outputs.summary }}) on ${{ github.sha }}
✅ lean4checker [succeeded](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) on ${{ github.sha }}
- name: Post failure message on Zulip
if: failure()
Expand All @@ -110,7 +108,7 @@ jobs:
type: 'stream'
topic: 'lean4checker failure'
content: |
❌ lean4checker [failed](${{ steps.ci_url.outputs.summary }}) on ${{ github.sha }}
❌ lean4checker [failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) on ${{ github.sha }}
continue-on-error: true

- name: Post failure message on Zulip main topic
Expand All @@ -124,5 +122,5 @@ jobs:
type: 'stream'
topic: 'lean4checker'
content: |
❌ lean4checker failed on ${{ github.sha }}
❌ lean4checker [failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) on ${{ github.sha }}
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/lint_and_suggest_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4

- name: install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maintainer_merge_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
body: |
🚀 Pull request has been placed on the maintainer queue by ${{ github.event.comment.user.login }}.
- name: Add label to PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maintainer_merge_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
body: |
🚀 Pull request has been placed on the maintainer queue by ${{ github.event.review.user.login }}.
- name: Add label to PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maintainer_merge_review_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
body: |
🚀 Pull request has been placed on the maintainer queue by ${{ github.event.comment.user.login }}.
- name: Add label to PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/nightly_detect_failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,25 @@ jobs:
payload = f"🛠️: it looks like it's time to create a new bump/nightly-{current_version} branch from nightly-testing (specifically {sha}), and then PR that to {bump_branch}. "
payload += "To do so semi-automatically, run the following script from mathlib root:\n\n"
payload += f"```bash\n./scripts/create-adaptation-pr.sh --bumpversion={bump_branch_suffix} --nightlydate={current_version} --nightlysha={sha}\n```\n"
# Post the reminder message
request = {
'type': 'stream',
'to': 'nightly-testing',
'topic': 'Mathlib bump branch reminders',
'content': payload
}
result = client.send_message(request)
print(result)
# Only post if the message is different
# We compare the first 160 characters, since that includes the date and bump version
if not messages or messages[0]['content'][:160] != payload[:160]:
# Log messages, because the bot seems to repeat itself...
if messages:
print("###### Last message:")
print(messages[0]['content'])
print("###### Current message:")
print(payload)
else:
print('The strings match!')
# Post the reminder message
request = {
'type': 'stream',
'to': 'nightly-testing',
'topic': 'Mathlib bump branch reminders',
'content': payload
}
result = client.send_message(request)
print(result)
else:
print('No action needed.')
2 changes: 1 addition & 1 deletion .github/workflows/nolints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# The Hoskinson runners may not have jq installed, so do that now.
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v1.0.1
uses: dcarbone/install-jq-action@v2.1.0

- name: install elan
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *' # every day at 01:30 UTC
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest
steps:
# until https://github.com/actions/stale/pull/1145 is merged
- uses: asterisk/github-actions-stale@main-only-matching-filter
with:
debug-only: 'true' # TODO: remove in follow-up PR after testing is done!
stale-pr-label: 'stale'
stale-pr-message: 'Message to comment on stale PRs.'
close-pr-label: 'closed-due-to-inactivity'
close-pr-message: 'Comment on the staled PRs while closed'
days-before-stale: 60
days-before-close: 120
# search string from the Zulip #queue link at https://bit.ly/4eo6brN
# "is:open is:pr -is:draft base:master sort:updated-asc status:success -label:blocked-by-other-PR -label:merge-conflict -label:awaiting-CI -label:WIP -label:awaiting-author -label:delegated -label:auto-merge-after-CI -label:ready-to-merge -label:please-adopt -label:help-wanted -label:awaiting-zulip"
# We want PRs _not_ on the queue, so we keep "is:pr -is:draft base:master" (is:open is added by the action by default) as a prefix for all queries and then negate the rest of the params in separate queries to simulate boolean OR (see https://github.com/actions/stale/pull/1145)
# except for label:auto-merge-after-CI and label:ready-to-merge which presumably will be noticed before they go stale
only-matching-filter: '[ "is:pr -is:draft base:master -status:success", "is:pr -is:draft base:master label:blocked-by-other-PR", "is:pr -is:draft base:master label:merge-conflict", "is:pr -is:draft base:master label:awaiting-CI", "is:pr -is:draft base:master label:WIP", "is:pr -is:draft base:master label:awaiting-author", "is:pr -is:draft base:master label:delegated", "is:pr -is:draft base:master label:please-adopt", "is:pr -is:draft base:master label:help-wanted", "is:pr -is:draft base:master label:awaiting-zulip" ]'
2 changes: 1 addition & 1 deletion .github/workflows/update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Create Pull Request
if: ${{ !contains(steps.PR.outputs.pr_labels, 'ready-to-merge') }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: "${{ secrets.UPDATE_DEPENDENCIES_TOKEN }}"
commit-message: "chore: update Mathlib dependencies ${{ env.timestamp }}"
Expand Down
3 changes: 2 additions & 1 deletion Archive.lean
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Archive.Imo.Imo1972Q5
import Archive.Imo.Imo1975Q1
import Archive.Imo.Imo1977Q6
import Archive.Imo.Imo1981Q3
import Archive.Imo.Imo1982Q1
import Archive.Imo.Imo1986Q5
import Archive.Imo.Imo1987Q1
import Archive.Imo.Imo1988Q6
Expand Down Expand Up @@ -62,6 +63,6 @@ import Archive.Wiedijk100Theorems.InverseTriangleSum
import Archive.Wiedijk100Theorems.Konigsberg
import Archive.Wiedijk100Theorems.Partition
import Archive.Wiedijk100Theorems.PerfectNumbers
import Archive.Wiedijk100Theorems.SolutionOfCubic
import Archive.Wiedijk100Theorems.SolutionOfCubicQuartic
import Archive.Wiedijk100Theorems.SumOfPrimeReciprocalsDiverges
import Archive.ZagierTwoSquares
Loading

0 comments on commit 98cf94b

Please sign in to comment.