Skip to content

Commit 237fdb5

Browse files
authored
Merge branch 'master' into feature/simple-graph/acyclic-path-eq-snd
2 parents ba9fbfc + 888dee7 commit 237fdb5

4,487 files changed

Lines changed: 94298 additions & 39101 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/actions/get-mathlib-ci/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Any workflow that needs `mathlib-ci` should use this action instead of writing i
99
own `actions/checkout` block for `leanprover-community/mathlib-ci`.
1010

1111
The default `ref` in [`action.yml`](./action.yml) is the single canonical pinned
12-
`mathlib-ci` commit for this repository.
12+
`mathlib-ci` commit for this repository. This is auto-updated regularly by the
13+
[`update_dependencies.yml` workflow](../../workflows/update_dependencies.yml).
1314

1415
## Why
1516

.github/actions/get-mathlib-ci/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ inputs:
99
required: false
1010
# Default pinned commit used by workflows unless they explicitly override.
1111
# Update this ref as needed to pick up changes to mathlib-ci scripts
12-
default: 261ca4c0c6bd3267e4846ef9fdd676afab9fef4e
12+
# This is also updated automatically by .github/workflows/update_dependencies.yml
13+
default: 78f34ded6a5f5aa11ea5b7c3120fe5d8422db1da
1314
path:
1415
description: Checkout destination path.
1516
required: false

.github/workflows/actionlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1313

1414
- name: suggester / actionlint
15-
uses: reviewdog/action-actionlint@0d952c597ef8459f634d7145b0b044a9699e5e43 # v1.71.0
15+
uses: reviewdog/action-actionlint@6fb7acc99f4a1008869fa8a0f09cfca740837d9d # v1.72.0
1616
with:
1717
tool_name: actionlint
1818
fail_level: any

.github/workflows/add_label_from_diff.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
ref: master
2828
path: tools
2929
- name: Configure Lean
30-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
30+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
3131
with:
3232
auto-config: false
3333
use-github-cache: false

.github/workflows/build_template.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,19 @@ jobs:
310310
# cf. https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Mathlib.20has.20moved.20to.20the.20new.20module.20system/near/563452000
311311
echo "Warming up cache using previous commit: $PREV_SHA (source: $PREV_SHA_SOURCE)"
312312
if git cat-file -e "$PREV_SHA^{commit}" 2>/dev/null || git fetch --no-tags --depth=1 origin "$PREV_SHA"; then
313-
git checkout "$PREV_SHA"
314-
../tools-branch/.lake/build/bin/cache get
315-
# Run again with --repo, to ensure we actually get the oleans.
316-
../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" get
317-
318-
echo "Switching back to branch head"
319-
git checkout "$ORIG_SHA"
313+
# Skip warmup if the previous commit uses a different toolchain
314+
PREV_TOOLCHAIN=$(git show "$PREV_SHA:lean-toolchain" 2>/dev/null || true)
315+
if [[ "$PREV_TOOLCHAIN" != "$(cat lean-toolchain)" ]]; then
316+
echo "Previous commit $PREV_SHA uses a different toolchain ($PREV_TOOLCHAIN); skipping warmup."
317+
else
318+
git checkout "$PREV_SHA"
319+
../tools-branch/.lake/build/bin/cache get
320+
# Run again with --repo, to ensure we actually get the oleans.
321+
../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" get
322+
323+
echo "Switching back to branch head"
324+
git checkout "$ORIG_SHA"
325+
fi
320326
else
321327
echo "Could not fetch $PREV_SHA; skipping parent warmup cache fetch."
322328
fi
@@ -445,7 +451,7 @@ jobs:
445451
446452
- name: upload cache staging artifact
447453
if: ${{ always() && steps.cache_staging_check.outputs.has_files == 'true' }}
448-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
454+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
449455
with:
450456
name: cache-staging
451457
path: cache-staging/
@@ -568,12 +574,14 @@ jobs:
568574
- name: Generate lean-pr-testing app token
569575
if: ${{ always() && github.repository == 'leanprover-community/mathlib4-nightly-testing' && (startsWith(github.ref_name, 'lean-pr-testing-') || startsWith(github.ref_name, 'batteries-pr-testing-')) }}
570576
id: lean-pr-testing-token
571-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
577+
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
572578
with:
573-
app-id: ${{ secrets.MATHLIB_LEAN_PR_TESTING_APP_ID }}
574-
private-key: ${{ secrets.MATHLIB_LEAN_PR_TESTING_PRIVATE_KEY }}
575-
owner: leanprover
576-
repositories: lean4
579+
# `batteries-pr-testing-*` branches need a token scoped to `leanprover-community/batteries`
580+
# for the labelling API; `lean-pr-testing-*` branches need one scoped to `leanprover/lean4`.
581+
app-id: ${{ startsWith(github.ref_name, 'batteries-pr-testing-') && secrets.MATHLIB_NIGHTLY_TESTING_APP_ID || secrets.MATHLIB_LEAN_PR_TESTING_APP_ID }}
582+
private-key: ${{ startsWith(github.ref_name, 'batteries-pr-testing-') && secrets.MATHLIB_NIGHTLY_TESTING_PRIVATE_KEY || secrets.MATHLIB_LEAN_PR_TESTING_PRIVATE_KEY }}
583+
owner: ${{ startsWith(github.ref_name, 'batteries-pr-testing-') && 'leanprover-community' || 'leanprover' }}
584+
repositories: ${{ startsWith(github.ref_name, 'batteries-pr-testing-') && 'batteries' || 'lean4' }}
577585
# The create-github-app-token README states that this token is masked and will not be logged accidentally.
578586
- name: Post comments for lean-pr-testing-NNNN and batteries-pr-testing-NNNN branches
579587
if: ${{ always() && github.repository == 'leanprover-community/mathlib4-nightly-testing' && (startsWith(github.ref_name, 'lean-pr-testing-') || startsWith(github.ref_name, 'batteries-pr-testing-')) }}
@@ -612,7 +620,7 @@ jobs:
612620
fetch-depth: 1
613621

614622
- name: Configure Lean
615-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
623+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
616624
with:
617625
auto-config: false # Don't run `lake build`, `lake test`, or `lake lint` automatically.
618626
use-github-cache: false
@@ -630,7 +638,7 @@ jobs:
630638
echo "CACHE_BIN=$CACHE_BIN" >> "$GITHUB_ENV"
631639
632640
- name: Download cache staging artifact
633-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
641+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
634642
with:
635643
name: cache-staging
636644
path: cache-staging
@@ -683,7 +691,7 @@ jobs:
683691
ref: ${{ inputs.pr_branch_ref }}
684692

685693
- name: Configure Lean
686-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
694+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
687695
with:
688696
auto-config: false # Don't run `lake build`, `lake test`, or `lake lint` automatically.
689697
use-github-cache: false
@@ -726,7 +734,7 @@ jobs:
726734
lake exe graph
727735
728736
- name: upload the import graph
729-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
737+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
730738
with:
731739
name: import-graph
732740
path: import_graph.dot
@@ -737,6 +745,12 @@ jobs:
737745
- name: clean up the import graph file
738746
run: rm import_graph.dot
739747

748+
- name: check all scripts build successfully
749+
run: |
750+
lake env lean scripts/create_deprecated_modules.lean
751+
lake env lean scripts/autolabel.lean
752+
lake exe check_title_labels --labels "t-algebra" "feat: dummy PR for testing"
753+
740754
- name: build everything
741755
# make sure everything is available for test/import_all.lean
742756
# and that miscellaneous executables still work
@@ -862,7 +876,7 @@ jobs:
862876
steps.get-label-actor.outputs.username != 'mathlib-update-dependencies' &&
863877
steps.get-label-actor.outputs.username != 'mathlib-splicebot'
864878
name: check team membership
865-
uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 # v3.0.0
879+
uses: tspascoal/get-user-teams-membership@818140d631d5f29f26b151afbe4179f87d9ceb5e # v4.0.1
866880
id: actorTeams
867881
with:
868882
organization: leanprover-community # optional. Default value ${{ github.repository_owner }}

.github/workflows/check_pr_titles.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
ref: master
2525
- name: Configure Lean
26-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
26+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
2727
with:
2828
auto-config: false
2929
use-github-cache: false
@@ -70,7 +70,7 @@ jobs:
7070
fi
7171
7272
- name: Add comment to fix PR title
73-
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
73+
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
7474
if: failure() && steps.pr-title-check.outputs.errors
7575
with:
7676
header: 'PR Title Check'
@@ -120,7 +120,7 @@ jobs:
120120
121121
- name: Add comment that PR title is fixed
122122
if: steps.pr-title-check.outcome == 'success'
123-
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
123+
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
124124
with:
125125
header: 'PR Title Check'
126126
# should do nothing if a 'PR Title Check' comment does not exist

.github/workflows/commit_verification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
}' > bridge-outputs.json
112112
113113
- name: Emit bridge artifact
114-
uses: leanprover-community/privilege-escalation-bridge/emit@d3bd99c50a4cf8c5350a211e8e3ba07ac19067d8 # v1.1.0
114+
uses: leanprover-community/privilege-escalation-bridge/emit@f5dfe313a79647c07315b451b2dc2a81a161a50d # v1.2.0
115115
with:
116116
artifact: workflow-data
117117
outputs_file: bridge-outputs.json

.github/workflows/commit_verification_wf_run.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: Consume bridge artifact
2727
id: bridge
28-
uses: leanprover-community/privilege-escalation-bridge/consume@d3bd99c50a4cf8c5350a211e8e3ba07ac19067d8 # v1.1.0
28+
uses: leanprover-community/privilege-escalation-bridge/consume@f5dfe313a79647c07315b451b2dc2a81a161a50d # v1.2.0
2929
with:
3030
token: ${{ github.token }}
3131
artifact: workflow-data

.github/workflows/daily.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
ref: ${{ env.BRANCH_REF }}
5959

6060
- name: Configure Lean
61-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
61+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
6262
with:
6363
auto-config: false
6464
use-github-cache: false
@@ -127,7 +127,7 @@ jobs:
127127
api-key: ${{ secrets.ZULIP_API_KEY }}
128128
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
129129
organization-url: 'https://leanprover.zulipchat.com'
130-
to: 'nightly-testing'
130+
to: 'nightly-testing-mathlib'
131131
type: 'stream'
132132
topic: 'leanchecker'
133133
content: |
@@ -140,7 +140,7 @@ jobs:
140140
api-key: ${{ secrets.ZULIP_API_KEY }}
141141
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
142142
organization-url: 'https://leanprover.zulipchat.com'
143-
to: 'nightly-testing'
143+
to: 'nightly-testing-mathlib'
144144
type: 'stream'
145145
topic: 'leanchecker failure'
146146
content: |
@@ -183,7 +183,7 @@ jobs:
183183
ref: ${{ env.BRANCH_REF }}
184184

185185
- name: Configure Lean
186-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
186+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
187187
with:
188188
auto-config: false
189189
use-github-cache: false
@@ -250,7 +250,7 @@ jobs:
250250
api-key: ${{ secrets.ZULIP_API_KEY }}
251251
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
252252
organization-url: 'https://leanprover.zulipchat.com'
253-
to: 'nightly-testing'
253+
to: 'nightly-testing-mathlib'
254254
type: 'stream'
255255
topic: 'mathlib test executable'
256256
content: |
@@ -263,7 +263,7 @@ jobs:
263263
api-key: ${{ secrets.ZULIP_API_KEY }}
264264
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
265265
organization-url: 'https://leanprover.zulipchat.com'
266-
to: 'nightly-testing'
266+
to: 'nightly-testing-mathlib'
267267
type: 'stream'
268268
topic: 'mathlib test executable failure'
269269
content: |
@@ -306,7 +306,7 @@ jobs:
306306
ref: ${{ env.BRANCH_REF }}
307307

308308
- name: Configure Lean
309-
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
309+
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
310310
with:
311311
auto-config: false
312312
use-github-cache: false
@@ -415,7 +415,7 @@ jobs:
415415
api-key: ${{ secrets.ZULIP_API_KEY }}
416416
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
417417
organization-url: 'https://leanprover.zulipchat.com'
418-
to: 'nightly-testing'
418+
to: 'nightly-testing-mathlib'
419419
type: 'stream'
420420
topic: 'nanoda'
421421
content: |
@@ -428,7 +428,7 @@ jobs:
428428
api-key: ${{ secrets.ZULIP_API_KEY }}
429429
email: 'github-mathlib4-bot@leanprover.zulipchat.com'
430430
organization-url: 'https://leanprover.zulipchat.com'
431-
to: 'nightly-testing'
431+
to: 'nightly-testing-mathlib'
432432
type: 'stream'
433433
topic: 'nanoda failure'
434434
content: |

.github/workflows/dependent-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'leanprover-community/mathlib4'
1313
# timeout-minutes: 3
1414
steps:
15-
- uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
15+
- uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
1616
with:
1717
all_but_latest: true
1818
access_token: ${{ github.token }}

0 commit comments

Comments
 (0)