Skip to content

Commit e3692a5

Browse files
Merge branch 'master' into justus/triangulated_generators
2 parents f21237d + 205a0ba commit e3692a5

File tree

645 files changed

+11856
-5082
lines changed

Some content is hidden

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

645 files changed

+11856
-5082
lines changed

.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: b6def9edd1c39de8602b8c177c66e9416e5dbc60
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/build_template.yml

Lines changed: 10 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -247,76 +247,6 @@ jobs:
247247
echo "✅ All inputRevs in lake-manifest.json are valid"
248248
fi
249249
250-
- name: validate ProofWidgets source repository
251-
# Only enforce this on the main mathlib4 repository, not on nightly-testing
252-
if: github.repository == 'leanprover-community/mathlib4'
253-
shell: bash
254-
run: |
255-
cd pr-branch
256-
257-
expected_url='https://github.com/leanprover-community/ProofWidgets4'
258-
proofwidgets_count=$(jq '[.packages[] | select(.name == "proofwidgets")] | length' lake-manifest.json)
259-
if [ "$proofwidgets_count" -ne 1 ]; then
260-
echo "❌ Error: expected exactly one proofwidgets entry in lake-manifest.json, found $proofwidgets_count"
261-
exit 1
262-
fi
263-
264-
proofwidgets_url=$(jq -r '.packages[] | select(.name == "proofwidgets") | .url' lake-manifest.json)
265-
normalized_url="${proofwidgets_url%.git}"
266-
if [ "$normalized_url" != "$expected_url" ]; then
267-
echo "❌ Error: invalid ProofWidgets source URL in lake-manifest.json"
268-
echo " expected: $expected_url"
269-
echo " found: $proofwidgets_url"
270-
exit 1
271-
fi
272-
273-
echo "✅ ProofWidgets source URL is allowed: $proofwidgets_url"
274-
275-
- name: verify ProofWidgets lean-toolchain matches on versioned releases
276-
# Only enforce this on the main mathlib4 repository, not on nightly-testing
277-
if: github.repository == 'leanprover-community/mathlib4'
278-
shell: bash
279-
run: |
280-
cd pr-branch
281-
282-
# Read the lean-toolchain file
283-
TOOLCHAIN=$(cat lean-toolchain | tr -d '[:space:]')
284-
echo "Lean toolchain: $TOOLCHAIN"
285-
286-
# Check if toolchain matches the versioned release pattern: leanprover/lean4:vX.Y.Z (with optional suffix like -rc1)
287-
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then
288-
echo "✓ Detected versioned Lean release: $TOOLCHAIN"
289-
echo "Verifying ProofWidgets lean-toolchain matches..."
290-
291-
# Check if ProofWidgets lean-toolchain exists
292-
if [ ! -f .lake/packages/proofwidgets/lean-toolchain ]; then
293-
echo "❌ Error: .lake/packages/proofwidgets/lean-toolchain does not exist"
294-
echo "This file should be created by 'lake env' during dependency download."
295-
exit 1
296-
fi
297-
298-
# Read ProofWidgets lean-toolchain
299-
PROOFWIDGETS_TOOLCHAIN=$(cat .lake/packages/proofwidgets/lean-toolchain | tr -d '[:space:]')
300-
echo "ProofWidgets toolchain: $PROOFWIDGETS_TOOLCHAIN"
301-
302-
# Compare the two
303-
if [ "$TOOLCHAIN" != "$PROOFWIDGETS_TOOLCHAIN" ]; then
304-
echo "❌ Error: Lean toolchain mismatch!"
305-
echo " Main lean-toolchain: $TOOLCHAIN"
306-
echo " ProofWidgets lean-toolchain: $PROOFWIDGETS_TOOLCHAIN"
307-
echo ""
308-
echo "When using a versioned Lean release (leanprover/lean4:vX.Y.Z),"
309-
echo "the ProofWidgets dependency must use the same toolchain."
310-
echo "Please update the ProofWidgets dependency to use $TOOLCHAIN"
311-
exit 1
312-
else
313-
echo "✅ ProofWidgets lean-toolchain matches: $TOOLCHAIN"
314-
fi
315-
else
316-
echo "ℹ Lean toolchain is not a versioned release (pattern: leanprover/lean4:vX.Y.Z)"
317-
echo "Skipping ProofWidgets toolchain verification."
318-
fi
319-
320250
- name: get cache (1/3 - setup and initial fetch)
321251
id: get_cache_part1_setup
322252
shell: bash # only runs `cache get` from `tools-branch`, so doesn't need to be inside landrun
@@ -327,7 +257,7 @@ jobs:
327257
328258
# Fail quickly if the cache is completely cold, by checking for Mathlib.Init
329259
echo "Attempting to fetch olean for Mathlib/Init.lean from cache..."
330-
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Mathlib/Init.lean
260+
../tools-branch/.lake/build/bin/cache get Mathlib/Init.lean
331261
332262
- name: get cache (2/3 - test Mathlib.Init cache)
333263
id: get_cache_part2_test
@@ -381,9 +311,9 @@ jobs:
381311
echo "Warming up cache using previous commit: $PREV_SHA (source: $PREV_SHA_SOURCE)"
382312
if git cat-file -e "$PREV_SHA^{commit}" 2>/dev/null || git fetch --no-tags --depth=1 origin "$PREV_SHA"; then
383313
git checkout "$PREV_SHA"
384-
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get
314+
../tools-branch/.lake/build/bin/cache get
385315
# Run again with --repo, to ensure we actually get the oleans.
386-
../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" --skip-proofwidgets get
316+
../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" get
387317
388318
echo "Switching back to branch head"
389319
git checkout "$ORIG_SHA"
@@ -396,18 +326,10 @@ jobs:
396326
397327
echo "Fetching all remaining cache..."
398328
399-
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get
329+
../tools-branch/.lake/build/bin/cache get
400330
401331
# Run again with --repo, to ensure we actually get the oleans.
402-
../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" --skip-proofwidgets get
403-
404-
- name: fetch ProofWidgets release
405-
# We need network access for ProofWidgets frontend assets.
406-
# Run inside landrun so PR-controlled code remains sandboxed.
407-
shell: landrun --unrestricted-network --rox /etc --rox /usr --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT --env CI -- bash -euxo pipefail {0}
408-
run: |
409-
cd pr-branch
410-
lake build proofwidgets:release
332+
../tools-branch/.lake/build/bin/cache --repo="$CACHE_REPO" get
411333
412334
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
413335
id: mk_all
@@ -462,8 +384,8 @@ jobs:
462384
shell: bash
463385
run: |
464386
cd pr-branch
465-
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Archive.lean
466-
../tools-branch/.lake/build/bin/cache --skip-proofwidgets get Counterexamples.lean
387+
../tools-branch/.lake/build/bin/cache get Archive.lean
388+
../tools-branch/.lake/build/bin/cache get Counterexamples.lean
467389
468390
- name: build archive
469391
id: archive
@@ -646,7 +568,7 @@ jobs:
646568
- name: Generate lean-pr-testing app token
647569
if: ${{ always() && github.repository == 'leanprover-community/mathlib4-nightly-testing' && (startsWith(github.ref_name, 'lean-pr-testing-') || startsWith(github.ref_name, 'batteries-pr-testing-')) }}
648570
id: lean-pr-testing-token
649-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
571+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
650572
with:
651573
app-id: ${{ secrets.MATHLIB_LEAN_PR_TESTING_APP_ID }}
652574
private-key: ${{ secrets.MATHLIB_LEAN_PR_TESTING_PRIVATE_KEY }}
@@ -708,7 +630,7 @@ jobs:
708630
echo "CACHE_BIN=$CACHE_BIN" >> "$GITHUB_ENV"
709631
710632
- name: Download cache staging artifact
711-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
633+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
712634
with:
713635
name: cache-staging
714636
path: cache-staging
@@ -955,6 +877,7 @@ jobs:
955877
steps.get-label-actor.outputs.username == 'mathlib-update-dependencies' ||
956878
steps.get-label-actor.outputs.username == 'mathlib-splicebot' ||
957879
contains(steps.actorTeams.outputs.teams, 'mathlib-maintainers') ||
880+
contains(steps.actorTeams.outputs.teams, 'lean-release-managers') ||
958881
contains(steps.actorTeams.outputs.teams, 'bot-users')
959882
)
960883
name: If `auto-merge-after-CI` is present, add a `bors merge` comment.

.github/workflows/check_pr_titles.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3.0.2
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@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3.0.2
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/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 }}

.github/workflows/export_telemetry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Export workflow telemetry
22-
uses: corentinmusard/otel-cicd-action@0f9f16fceb53fd8c996042e28c642ec61f844876 # v4.0.0
22+
uses: corentinmusard/otel-cicd-action@f2d88ecf54d9dd3e01ea95e25f93603212ee93d3 # v4.0.1
2323
with:
2424
otlpEndpoint: ${{ vars.OTLP_ENDPOINT }}
2525
otlpHeaders: ${{ secrets.OTLP_HEADERS }}

.github/workflows/label_new_contributor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
100100
- name: Post welcome comment for new contributor
101101
if: steps.contributor-check.outputs.should_welcome == 'true'
102-
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
102+
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3.0.2
103103
with:
104104
header: 'New Contributor Welcome'
105105
message: |

0 commit comments

Comments
 (0)