Skip to content

Commit 8e321ad

Browse files
committed
Merge branch 'nightly-with-mathlib' of https://github.com/leanprover/lean4 into joachim/issue10794
2 parents da86ee9 + 4ce7ad1 commit 8e321ad

File tree

970 files changed

+3809
-2519
lines changed

Some content is hidden

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

970 files changed

+3809
-2519
lines changed

.github/workflows/build-template.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: build-template
33
on:
44
workflow_call:
55
inputs:
6-
check-level:
7-
type: string
8-
required: true
96
config:
107
type: string
118
required: true
@@ -230,7 +227,7 @@ jobs:
230227
run: |
231228
ulimit -c unlimited # coredumps
232229
time ctest --preset ${{ matrix.CMAKE_PRESET || 'release' }} --test-dir build/$TARGET_STAGE -j$NPROC --output-junit test-results.xml ${{ matrix.CTEST_OPTIONS }}
233-
if: (matrix.wasm || !matrix.cross) && (inputs.check-level >= 1 || matrix.test)
230+
if: matrix.test
234231
- name: Test Summary
235232
uses: test-summary/action@v2
236233
with:

.github/workflows/ci.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ jobs:
3131
configure:
3232
runs-on: ubuntu-latest
3333
outputs:
34-
# 0: PRs without special label
35-
# 1: PRs with `merge-ci` label, merge queue checks, master commits
36-
# 2: PRs with `release-ci` label, releases (incl. nightlies)
37-
check-level: ${{ steps.set-level.outputs.check-level }}
3834
# The build matrix, dynamically generated here
3935
matrix: ${{ steps.set-matrix.outputs.matrix }}
4036
# secondary build jobs that should not block the CI success/merge queue
@@ -110,6 +106,9 @@ jobs:
110106
TAG_NAME="${GITHUB_REF##*/}"
111107
echo "RELEASE_TAG=$TAG_NAME" >> "$GITHUB_OUTPUT"
112108
109+
# 0: PRs without special label
110+
# 1: PRs with `merge-ci` label, merge queue checks, master commits
111+
# 2: PRs with `release-ci` label, releases (incl. nightlies)
113112
- name: Set check level
114113
id: set-level
115114
# We do not use github.event.pull_request.labels.*.name here because
@@ -152,7 +151,8 @@ jobs:
152151
"name": "Linux LLVM",
153152
"os": "ubuntu-latest",
154153
"release": false,
155-
"check-level": 2,
154+
"enabled": level >= 2,
155+
"test": true,
156156
"shell": "nix develop .#oldGlibc -c bash -euxo pipefail {0}",
157157
"llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-linux-gnu.tar.zst",
158158
"prepare-llvm": "../script/prepare-llvm-linux.sh lean-llvm*",
@@ -168,14 +168,15 @@ jobs:
168168
"os": "ubuntu-latest",
169169
"release": true,
170170
// Special handling for release jobs. We want:
171-
// 1. To run it in PRs so developers get PR toolchains (so secondary is sufficient)
171+
// 1. To run it in PRs so developers get PR toolchains (so secondary without tests is sufficient)
172172
// 2. To skip it in merge queues as it takes longer than the
173173
// Linux lake build and adds little value in the merge queue
174174
// 3. To run it in release (obviously)
175175
// 4. To run it for pushes to master so that pushes to master have a Linux toolchain
176176
// available as an artifact for Grove to use.
177-
"check-level": (isPr || isPushToMaster) ? 0 : 2,
178-
"secondary": isPr,
177+
"enabled": isPr || level != 1 || isPushToMaster,
178+
"test": level >= 1,
179+
"secondary": level == 0,
179180
"shell": "nix develop .#oldGlibc -c bash -euxo pipefail {0}",
180181
"llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-linux-gnu.tar.zst",
181182
"prepare-llvm": "../script/prepare-llvm-linux.sh lean-llvm*",
@@ -186,10 +187,9 @@ jobs:
186187
{
187188
"name": "Linux Lake",
188189
"os": large ? "nscloud-ubuntu-22.04-amd64-8x16-with-cache" : "ubuntu-latest",
189-
"check-level": 0,
190+
"enabled": true,
190191
"check-rebootstrap": level >= 1,
191192
"check-stage3": level >= 2,
192-
// only check-level >= 1 opts into tests implicitly. TODO: Clean up this logic.
193193
"test": true,
194194
// NOTE: `test-speedcenter` currently seems to be broken on `ubuntu-latest`
195195
"test-speedcenter": large && level >= 2,
@@ -199,14 +199,16 @@ jobs:
199199
{
200200
"name": "Linux Reldebug",
201201
"os": "ubuntu-latest",
202-
"check-level": 2,
202+
"enabled": level >= 2,
203+
"test": true,
203204
"CMAKE_PRESET": "reldebug",
204205
},
205206
// TODO: suddenly started failing in CI
206207
/*{
207208
"name": "Linux fsanitize",
208209
"os": "ubuntu-latest",
209-
"check-level": 2,
210+
"enabled": level >= 2,
211+
"test": true,
210212
// turn off custom allocator & symbolic functions to make LSAN do its magic
211213
"CMAKE_PRESET": "sanitize",
212214
// exclude seriously slow/problematic tests (laketests crash)
@@ -217,7 +219,7 @@ jobs:
217219
"os": "macos-15-intel",
218220
"release": true,
219221
"test": false, // Tier 2 platform
220-
"check-level": 2,
222+
"enabled": level >= 2,
221223
"shell": "bash -euxo pipefail {0}",
222224
"llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-apple-darwin.tar.zst",
223225
"prepare-llvm": "../script/prepare-llvm-macos.sh lean-llvm*",
@@ -228,23 +230,25 @@ jobs:
228230
{
229231
"name": "macOS aarch64",
230232
// standard GH runner only comes with 7GB so use large runner if possible when running tests
231-
"os": large && !isPr ? "nscloud-macos-sequoia-arm64-6x14" : "macos-15",
233+
"os": large && level >= 1 ? "nscloud-macos-sequoia-arm64-6x14" : "macos-15",
232234
"CMAKE_OPTIONS": "-DLEAN_INSTALL_SUFFIX=-darwin_aarch64",
233235
"release": true,
236+
"test": true,
234237
"shell": "bash -euxo pipefail {0}",
235238
"llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-aarch64-apple-darwin.tar.zst",
236239
"prepare-llvm": "../script/prepare-llvm-macos.sh lean-llvm*",
237240
"binary-check": "otool -L",
238241
"tar": "gtar", // https://github.com/actions/runner-images/issues/2619
239242
// See "Linux release" for release job levels; Grove is not a concern here
240-
"check-level": isPr ? 0 : 2,
241-
"secondary": isPr,
243+
"enabled": isPr || level != 1,
244+
"secondary": level == 0,
242245
},
243246
{
244247
"name": "Windows",
245248
"os": large && level == 2 ? "namespace-profile-windows-amd64-4x16" : "windows-2022",
246249
"release": true,
247-
"check-level": 2,
250+
"enabled": level >= 2,
251+
"test": true,
248252
"shell": "msys2 {0}",
249253
"CMAKE_OPTIONS": "-G \"Unix Makefiles\"",
250254
"llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-x86_64-w64-windows-gnu.tar.zst",
@@ -256,7 +260,8 @@ jobs:
256260
"os": "nscloud-ubuntu-22.04-arm64-4x16",
257261
"CMAKE_OPTIONS": "-DLEAN_INSTALL_SUFFIX=-linux_aarch64",
258262
"release": true,
259-
"check-level": 2,
263+
"enabled": level >= 2,
264+
"test": true,
260265
"shell": "nix develop .#oldGlibcAArch -c bash -euxo pipefail {0}",
261266
"llvm-url": "https://github.com/leanprover/lean-llvm/releases/download/19.1.2/lean-llvm-aarch64-linux-gnu.tar.zst",
262267
"prepare-llvm": "../script/prepare-llvm-linux.sh lean-llvm*",
@@ -269,7 +274,7 @@ jobs:
269274
// "CMAKE_OPTIONS": "-DSTAGE0_USE_GMP=OFF -DSTAGE0_LEAN_EXTRA_CXX_FLAGS='-m32' -DSTAGE0_LEANC_OPTS='-m32' -DSTAGE0_MMAP=OFF -DUSE_GMP=OFF -DLEAN_EXTRA_CXX_FLAGS='-m32' -DLEANC_OPTS='-m32' -DMMAP=OFF -DLEAN_INSTALL_SUFFIX=-linux_x86 -DCMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ -DSTAGE0_CMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ -DPKG_CONFIG_EXECUTABLE=/usr/bin/i386-linux-gnu-pkg-config",
270275
// "cmultilib": true,
271276
// "release": true,
272-
// "check-level": 2,
277+
// "enabled": level >= 2,
273278
// "cross": true,
274279
// "shell": "bash -euxo pipefail {0}"
275280
//}
@@ -281,7 +286,7 @@ jobs:
281286
// "wasm": true,
282287
// "cmultilib": true,
283288
// "release": true,
284-
// "check-level": 2,
289+
// "enabled": level >= 2,
285290
// "cross": true,
286291
// "shell": "bash -euxo pipefail {0}",
287292
// // Just a few selected tests because wasm is slow
@@ -295,7 +300,7 @@ jobs:
295300
}
296301
}
297302
console.log(`matrix:\n${JSON.stringify(matrix, null, 2)}`);
298-
matrix = matrix.filter((job) => level >= job["check-level"]);
303+
matrix = matrix.filter((job) => job["enabled"]);
299304
core.setOutput('matrix', matrix.filter((job) => !job["secondary"]));
300305
core.setOutput('matrix-secondary', matrix.filter((job) => job["secondary"]));
301306
@@ -305,7 +310,6 @@ jobs:
305310
uses: ./.github/workflows/build-template.yml
306311
with:
307312
config: ${{needs.configure.outputs.matrix}}
308-
check-level: ${{ needs.configure.outputs.check-level }}
309313
nightly: ${{ needs.configure.outputs.nightly }}
310314
LEAN_VERSION_MAJOR: ${{ needs.configure.outputs.LEAN_VERSION_MAJOR }}
311315
LEAN_VERSION_MINOR: ${{ needs.configure.outputs.LEAN_VERSION_MINOR }}
@@ -321,7 +325,6 @@ jobs:
321325
uses: ./.github/workflows/build-template.yml
322326
with:
323327
config: ${{needs.configure.outputs.matrix-secondary}}
324-
check-level: ${{ needs.configure.outputs.check-level }}
325328
nightly: ${{ needs.configure.outputs.nightly }}
326329
LEAN_VERSION_MAJOR: ${{ needs.configure.outputs.LEAN_VERSION_MAJOR }}
327330
LEAN_VERSION_MINOR: ${{ needs.configure.outputs.LEAN_VERSION_MINOR }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ tasks.json
2020
settings.json
2121
.gdb_history
2222
.vscode/*
23-
!.vscode/settings.json
2423
script/__pycache__
2524
*.produced.out
2625
CMakeSettings.json

lean.code-workspace

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
],
1616
"settings": {
1717
// Open terminal at root, not current workspace folder
18-
"terminal.integrated.cwd": "${workspaceFolder:.}",
18+
// (there is not way to directly refer to the root folder included as `.` above)
19+
"terminal.integrated.cwd": "${workspaceFolder:src}/..",
1920
"files.insertFinalNewline": true,
2021
"files.trimTrailingWhitespace": true,
2122
"cmake.buildDirectory": "${workspaceFolder}/build/release",

src/Init/BinderNameHint.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Authors: Joachim Breitner
77
module
88

99
prelude
10-
public import Init.Prelude
1110
public import Init.Tactics
1211

1312
public section

src/Init/Control/EState.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Authors: Leonardo de Moura
66
module
77

88
prelude
9-
public import Init.Control.State
10-
public import Init.Control.Except
119
public import Init.Data.ToString.Basic
1210

1311
public section

src/Init/Control/Except.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module
1010
prelude
1111
public import Init.Control.Basic
1212
public import Init.Control.Id
13-
public import Init.Coe
1413

1514
@[expose] public section
1615

src/Init/Control/Lawful/Basic.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ module
77

88
prelude
99
public import Init.Ext
10-
public import Init.SimpLemmas
11-
public import Init.Meta
1210

1311
public section
1412

src/Init/Control/Lawful/Instances.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ module
77

88
prelude
99
public import Init.Control.Lawful.Basic
10-
public import Init.Control.Except
1110
import all Init.Control.Except
1211
public import Init.Control.Option
1312
import all Init.Control.Option
14-
public import Init.Control.State
1513
import all Init.Control.State
1614
public import Init.Control.StateRef
17-
public import Init.Ext
1815

1916
public section
2017

src/Init/Control/Lawful/Lemmas.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module
77

88
prelude
99
public import Init.Control.Lawful.Basic
10-
public import Init.RCases
1110
public import Init.ByCases
1211

1312
public section

0 commit comments

Comments
 (0)