Skip to content

Commit 911cb01

Browse files
Merge branch 'erdos-stone-1' into erdos-stone-2
2 parents f7c1864 + 483a311 commit 911cb01

8,724 files changed

Lines changed: 632280 additions & 275156 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.

.devcontainer/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
FROM mcr.microsoft.com/devcontainers/base:jammy
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu
22

33
USER vscode
44
WORKDIR /home/vscode
55

66
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
7-
8-
ENV PATH="/home/vscode/.elan/bin:${PATH}"

.devcontainer/devcontainer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
22
"name": "Mathlib4 dev container",
33

4-
"image": "ghcr.io/leanprover-community/mathlib4/gitpod",
4+
"build": {
5+
"dockerfile": "Dockerfile"
6+
},
57

68
"onCreateCommand": "lake exe cache get!",
79

810
"hostRequirements": {
9-
"cpus": 4
11+
"cpus": 4,
12+
"memory": "8gb"
1013
},
1114

1215
"customizations": {
13-
"vscode" : {
14-
"extensions" : [ "leanprover.lean4" ]
16+
"vscode": {
17+
"extensions": ["leanprover.lean4"]
1518
}
1619
}
1720
}

.docker/gitpod-blueprint/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FROM ubuntu:jammy
1010
USER root
1111

1212
ENV DEBIAN_FRONTEND=noninteractive
13-
RUN apt-get update && apt-get install sudo git curl git bash-completion texlive texlive-xetex latexmk graphviz graphviz-dev python3 python3-pip python3-requests -y && apt-get clean
13+
RUN apt-get update && apt-get install sudo git curl git bash-completion texlive texlive-xetex latexmk graphviz graphviz-dev tzdata python3 python3-pip python3-requests -y && apt-get clean
1414

1515
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
1616
# passwordless sudo for users in the 'sudo' group

.docker/gitpod/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FROM ubuntu:jammy
99
USER root
1010

1111
ENV DEBIAN_FRONTEND=noninteractive
12-
RUN apt-get update && apt-get install sudo git curl git bash-completion python3 python3-pip python3-requests -y && apt-get clean
12+
RUN apt-get update && apt-get install sudo git curl git tzdata bash-completion python3 python3-pip python3-requests -y && apt-get clean
1313

1414
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
1515
# passwordless sudo for users in the 'sudo' group

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11

22
---
3-
<!-- The text above the `---` will become the commit message when your
4-
PR is merged. Please leave a blank newline before the `---`, otherwise
5-
GitHub will format the text above it as a title.
3+
<!-- Your PR title will become the first line of the commit message.
4+
5+
In this box, the text above the `---` (if not empty) will be appended
6+
to the commit message, and can be used to give additional context or
7+
details. Please leave a blank newline before the `---`, otherwise GitHub
8+
will format the text above it as a title.
69
710
For details on the "pull request lifecycle" in mathlib, please see:
811
https://leanprover-community.github.io/contribute/index.html
@@ -11,16 +14,26 @@ In particular, note that most reviewers will only notice your PR
1114
if it passes the continuous integration checks.
1215
Please ask for help on https://leanprover.zulipchat.com if needed.
1316
14-
To indicate co-authors, include at least one commit authored by each
15-
co-author among the commits in the pull request. If necessary, you may
16-
create empty commits to indicate co-authorship, using commands like so:
17+
When merging, all the commits will be squashed into a single commit
18+
listing all co-authors.
19+
20+
Co-authors in the squash commit are gathered from two sources:
21+
22+
First, all authors of commits to this PR branch are included. Thus,
23+
one way to add co-authors is to include at least one commit authored by
24+
each co-author among the commits in the pull request. If necessary, you
25+
may create empty commits to indicate co-authorship, using commands like so:
1726
1827
git commit --author="Author Name <author@email.com>" --allow-empty -m "add Author Name as coauthor"
1928
20-
When merging, all the commits will be squashed into a single commit listing all co-authors.
29+
Second, co-authors can also be listed in lines at the very bottom of
30+
the commit message (that is, directly before the `---`) using the following format:
31+
32+
Co-authored-by: Author Name <author@email.com>
2133
22-
If you are moving or deleting declarations, please include these lines at the bottom of the commit message
23-
(that is, before the `---`) using the following format:
34+
If you are moving or deleting declarations, please include these lines
35+
at the bottom of the commit message (before the `---`, and also before
36+
any "Co-authored-by" lines) using the following format:
2437
2538
Moves:
2639
- Vector.* -> List.Vector.*

.github/actionlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ self-hosted-runner:
22
labels:
33
- bors
44
- pr
5+
- doc-gen
6+
- lean4checker
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# get-mathlib-ci
2+
3+
This action is the source of truth for how workflows in this repository check out
4+
`leanprover-community/mathlib-ci`.
5+
6+
## Policy
7+
8+
Any workflow that needs `mathlib-ci` should use this action instead of writing its
9+
own `actions/checkout` block for `leanprover-community/mathlib-ci`.
10+
11+
The default `ref` in [`action.yml`](./action.yml) is the single canonical pinned
12+
`mathlib-ci` commit for this repository. This is auto-updated regularly by the
13+
[`update_dependencies.yml` workflow](../../workflows/update_dependencies.yml).
14+
15+
## Why
16+
17+
- Keep the pinned `mathlib-ci` ref in one place.
18+
- Avoid drift and copy/paste mistakes across many workflows.
19+
- Make ref bumps a one-file update.
20+
21+
## Usage
22+
23+
In workflows, check out this repository's actions from the running workflow commit,
24+
then use the local action:
25+
26+
```yaml
27+
- name: Checkout local actions
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
ref: ${{ github.workflow_sha }}
31+
fetch-depth: 1
32+
sparse-checkout: .github/actions
33+
path: workflow-actions
34+
35+
- name: Get mathlib-ci
36+
uses: ./workflow-actions/.github/actions/get-mathlib-ci
37+
```
38+
39+
Override the ref only when needed:
40+
41+
```yaml
42+
- name: Get mathlib-ci
43+
uses: ./workflow-actions/.github/actions/get-mathlib-ci
44+
with:
45+
ref: master
46+
```
47+
48+
## Outputs
49+
50+
This action also exposes values that later workflow steps can reuse:
51+
52+
- `ref`: the effective `mathlib-ci` ref that was checked out. If the workflow did
53+
not pass `with.ref`, this is the action's default pinned commit.
54+
- `path`: the checkout path used for `mathlib-ci`.
55+
- `scripts_dir`: the absolute path to the checked out `scripts` directory.
56+
57+
The action also exports these environment variables for subsequent steps:
58+
59+
- `CI_CHECKOUT_PATH`: the absolute path to the checked out `mathlib-ci` repository.
60+
- `CI_SCRIPTS_DIR`: the absolute path to the checked out `mathlib-ci/scripts` directory.
61+
62+
If a workflow needs to refer to the exact resolved `mathlib-ci` ref later, use the
63+
action output instead of duplicating the pinned SHA in the workflow:
64+
65+
```yaml
66+
- name: Get mathlib-ci
67+
id: get_mathlib_ci
68+
uses: ./workflow-actions/.github/actions/get-mathlib-ci
69+
70+
- name: Use resolved ref
71+
run: |
72+
echo "Resolved ref: ${{ steps.get_mathlib_ci.outputs.ref }}"
73+
echo "Scripts dir: ${{ steps.get_mathlib_ci.outputs.scripts_dir }}"
74+
echo "Raw URL: https://raw.githubusercontent.com/leanprover-community/mathlib-ci/${{ steps.get_mathlib_ci.outputs.ref }}/scripts/nightly/create-adaptation-pr.sh"
75+
```
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Source of truth for `mathlib-ci` checkout settings in this repository.
2+
# Workflows should use this action instead of duplicating the checkout block
3+
# and hardcoded ref in multiple places.
4+
name: Get mathlib-ci
5+
description: Checkout leanprover-community/mathlib-ci at a shared ref.
6+
inputs:
7+
ref:
8+
description: Git ref (branch, tag, or SHA) for mathlib-ci.
9+
required: false
10+
# Default pinned commit used by workflows unless they explicitly override.
11+
# Update this ref as needed to pick up changes to mathlib-ci scripts
12+
# This is also updated automatically by .github/workflows/update_dependencies.yml
13+
default: 8c3d31d2beba80d86de30b6ccd373d2c3a76b26e
14+
path:
15+
description: Checkout destination path.
16+
required: false
17+
default: ci-tools
18+
fetch-depth:
19+
description: Number of commits to fetch.
20+
required: false
21+
default: '1'
22+
outputs:
23+
ref:
24+
description: Effective ref used for the checkout.
25+
value: ${{ inputs.ref }}
26+
path:
27+
description: Checkout path used.
28+
value: ${{ inputs.path }}
29+
scripts_dir:
30+
description: Absolute path to the scripts directory.
31+
value: ${{ steps.paths.outputs.scripts_dir }}
32+
runs:
33+
using: composite
34+
steps:
35+
- name: Get mathlib-ci
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
with:
38+
repository: leanprover-community/mathlib-ci
39+
ref: ${{ inputs.ref }}
40+
fetch-depth: ${{ inputs.fetch-depth }}
41+
path: ${{ inputs.path }}
42+
43+
- name: Setup CI Scripts Paths
44+
id: paths
45+
shell: bash
46+
run: |
47+
checkout_path="${GITHUB_WORKSPACE}/${{ inputs.path }}"
48+
scripts_dir="${checkout_path}/scripts"
49+
echo "checkout_path=${checkout_path}" >> "$GITHUB_OUTPUT"
50+
echo "scripts_dir=${scripts_dir}" >> "$GITHUB_OUTPUT"
51+
echo "CI_CHECKOUT_PATH=${checkout_path}" >> "$GITHUB_ENV"
52+
echo "CI_SCRIPTS_DIR=${scripts_dir}" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)