Skip to content

Commit 12c5f7e

Browse files
authored
Merge branch 'leanprover:main' into main
2 parents 05d381c + 615b6d3 commit 12c5f7e

4 files changed

Lines changed: 27 additions & 108 deletions

File tree

.github/workflows/weekly-lints.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,35 @@ on:
55
- cron: '0 5 * * 1' # Run at 05:00 UTC every Monday
66
workflow_dispatch: # Allow manual triggering
77

8+
env:
9+
CSLIB: cslib
10+
811
jobs:
912
weekly-lints:
1013
name: Weekly Linting
1114
runs-on: ubuntu-latest
1215
if: github.repository == 'leanprover/cslib'
1316
steps:
17+
- name: Checkout Mathlib actions
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
fetch-depth: 1
21+
repository: leanprover-community/mathlib4
22+
sparse-checkout: .github/actions
23+
path: workflow-actions
24+
25+
- name: Get mathlib-ci
26+
uses: ./workflow-actions/.github/actions/get-mathlib-ci
27+
1428
- uses: actions/checkout@v4
1529
with:
16-
ref: main
30+
path: ${{ env.CSLIB }}
1731

1832
- name: Enable weekly linters
33+
working-directory: ${{ github.workspace }}/${{ env.CSLIB }}
1934
run: |
2035
# Add the mergeWithGrind linter back for this run
21-
sed -i '/^\[leanOptions\]/a weak.linter.tacticAnalysis.mergeWithGrind = true' lakefile.toml
36+
sed -i '/^\[leanOptions\]/a weak.linter.weeklyLintSet = true' lakefile.toml
2237
2338
# Show what changed
2439
git diff lakefile.toml
@@ -29,17 +44,21 @@ jobs:
2944
auto-config: false
3045
use-github-cache: true
3146
use-mathlib-cache: true
47+
lake-package-directory: ${{ env.CSLIB }}
3248

3349
- name: Build with weekly linters
3450
id: build
51+
working-directory: ${{ github.workspace }}/${{ env.CSLIB }}
3552
continue-on-error: true
3653
run: |
3754
lean_outfile=$(mktemp)
3855
(lake build || true) 2>&1 | tee "${lean_outfile}"
3956
40-
# Generate report for Zulip
41-
bash scripts/weekly_lint_report.sh "${lean_outfile}" \
42-
"${{ github.sha }}" "${{ github.repository }}" "${{ github.run_id }}" > "${GITHUB_OUTPUT}"
57+
# Process output for posting to Zulip
58+
SHA=${{ github.sha }} \
59+
REPO=${{ github.repository }} \
60+
RUN_ID=${{ github.run_id }} \
61+
"${CI_SCRIPTS_DIR}/reporting/zulip_build_report.sh" "${lean_outfile}" > "${GITHUB_OUTPUT}"
4362
4463
- name: Post output to Zulip
4564
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5

lake-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "git",
66
"subDir": null,
77
"scope": "leanprover-community",
8-
"rev": "ae0c6140a8312511dbb5bc265a0146dd418eca8d",
8+
"rev": "3d8100bbc657181d1f48868decaba9159580aa40",
99
"name": "mathlib",
1010
"manifestFile": "lake-manifest.json",
1111
"inputRev": "master",
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"subDir": null,
1717
"scope": "leanprover-community",
18-
"rev": "f449eabb8f7e3feef0366856c20e28a6d2c97ee3",
18+
"rev": "a3b459a8312125758e51c354b93d54ba620efda6",
1919
"name": "plausible",
2020
"manifestFile": "lake-manifest.json",
2121
"inputRev": "main",
@@ -35,7 +35,7 @@
3535
"type": "git",
3636
"subDir": null,
3737
"scope": "leanprover-community",
38-
"rev": "86503d416c875fdcf3b6b6c54c22581e96c6bda7",
38+
"rev": "4411c5f89c797401c609b3a946c8874569e69731",
3939
"name": "importGraph",
4040
"manifestFile": "lake-manifest.json",
4141
"inputRev": "main",

scripts/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,3 @@ to learn about it as well!
4545

4646
**Init Imports**
4747
- `CheckInitImports.lean` (run by `lake exe checkInitImports`) checks that all files transitively import `Cslib.Init`.
48-
49-
**Linting**
50-
- `weekly_lint_report.sh`
51-
Generates a summary of the weekly lint run for posting to Zulip. Called by the `weekly-lints.yml` workflow.
52-
The output format matches Mathlib's weekly linting reports, with tables showing grouped message counts.
53-
54-
**Usage:**
55-
```bash
56-
bash scripts/weekly_lint_report.sh <output_file> <sha> <repo> <run_id>
57-
```

scripts/weekly_lint_report.sh

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

0 commit comments

Comments
 (0)