Skip to content

Commit fc2e217

Browse files
committed
Merge branch 'master' into aliu/free
2 parents e646e0a + 34f85c5 commit fc2e217

7,626 files changed

Lines changed: 358494 additions & 160592 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: 6 additions & 3 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

.github/actionlint.yml

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

0 commit comments

Comments
 (0)