-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger CI for leanprover-community/batteries#854
- Loading branch information
Showing
4,617 changed files
with
202,538 additions
and
95,288 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This is the Dockerfile for `leanprovercommunity/gitpod4-blueprint`. | ||
# As well as elan, we also install leanblueprint and all of its dependencies. | ||
|
||
# This container does not come with a pre-installed version of mathlib. | ||
# When a gitpod container is spawned, elan will be updated and mathlib will be downloaded: | ||
# see the .gitpod.yml file for more information. | ||
|
||
FROM ubuntu:jammy | ||
|
||
USER root | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
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 | ||
|
||
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \ | ||
# passwordless sudo for users in the 'sudo' group | ||
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers | ||
USER gitpod | ||
WORKDIR /home/gitpod | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# gitpod bash prompt | ||
RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc | ||
|
||
# install elan | ||
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none | ||
|
||
# install whichever toolchain mathlib is currently using | ||
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain) | ||
|
||
# install neovim (for any lean.nvim user), via tarball since the appimage doesn't work for some reason, and jammy's version is ancient | ||
RUN curl -s -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz | tar xzf - && sudo mv nvim-linux64 /opt/nvim | ||
|
||
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:/opt/nvim/bin:${PATH}" | ||
|
||
# install leanblueprint | ||
RUN python3 -m pip install leanblueprint invoke | ||
|
||
# fix the infoview when the container is used on gitpod: | ||
ENV VSCODE_API_VERSION="1.50.0" | ||
|
||
# ssh to github once to bypass the unknown fingerprint warning | ||
RUN ssh -o StrictHostKeyChecking=no github.com || true | ||
|
||
# run sudo once to suppress usage info | ||
RUN sudo echo finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This is the Dockerfile for `leanprovercommunity/lean4`. | ||
# It is based on the generic `debian` image, and installs `elan` and the current stable version of `lean`. | ||
|
||
# This container does not come with a pre-installed version of mathlib; | ||
# you should call `lake exe cache get` which will download the most recent version. | ||
# The only difference between this Dockerfile and leanprovercommunity/lean4 is that this image | ||
# bypasses a warning that could occur when trying to connect to github for the first time. | ||
|
||
# NOTE: to run this docker image on macos or windows, | ||
# you will need to increase the allowed memory (in the docker GUI) beyond 2GB | ||
|
||
FROM debian | ||
USER root | ||
# install prerequisites | ||
RUN apt-get update && apt-get install curl git -y && apt-get clean | ||
# create a non-root user | ||
RUN useradd -m lean | ||
|
||
USER lean | ||
WORKDIR /home/lean | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
# set the entrypoint to be a login shell, so everything is on the PATH | ||
ENTRYPOINT ["/bin/bash", "-l"] | ||
|
||
# make sure binaries are available even in non-login shells | ||
ENV PATH="/home/lean/.elan/bin:/home/lean/.local/bin:$PATH" | ||
|
||
# install elan | ||
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none && \ | ||
. ~/.profile && \ | ||
elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib/master/leanpkg.toml | grep lean_version | awk -F'"' '{print $2}') && \ | ||
elan default stable | ||
|
||
# ssh to github once to bypass the unknown fingerprint warning | ||
RUN ssh -o StrictHostKeyChecking=no github.com || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,14 @@ | |
### NB: and regenerate those files by manually running | ||
### NB: .github/workflows/mk_build_yml.sh | ||
|
||
env: | ||
# Disable Lake's automatic fetching of cloud builds. | ||
# Lake's cache is currently incompatible with Mathlib's `lake exe cache`. | ||
# This is because Mathlib's Cache assumes all build aritfacts present in the build directory | ||
# are valid by-products of the Mathlib build. Build artifacts fetched from Lake's cache do | ||
# not necessarily satisfy this property. | ||
LAKE_NO_CACHE: true | ||
|
||
jobs: | ||
# Cancels previous runs of jobs in this file | ||
cancel: | ||
|
@@ -33,7 +41,7 @@ jobs: | |
uses: credfeto/[email protected] | ||
|
||
- name: Look for ignored files | ||
uses: credfeto/action-no-ignored-files@v1.1.0 | ||
uses: credfeto/action-no-ignored-files@v1.2.0 | ||
|
||
- name: "Check for Lean files with the executable bit set" | ||
shell: bash | ||
|
@@ -92,7 +100,7 @@ jobs: | |
# The Hoskinson runners may not have jq installed, so do that now. | ||
- name: 'Setup jq' | ||
uses: dcarbone/install-jq-action@v1.0.1 | ||
uses: dcarbone/install-jq-action@v2.1.0 | ||
|
||
- name: install elan | ||
run: | | ||
|
@@ -121,6 +129,7 @@ jobs: | |
- name: prune ProofWidgets .lake | ||
run: | | ||
lake build proofwidgets:release | ||
# The ProofWidgets release contains not just the `.js` (which we need in order to build) | ||
# but also `.oleans`, which may have been built with the wrong toolchain. | ||
# This removes them. | ||
|
@@ -156,6 +165,10 @@ jobs: | |
run: | | ||
bash -o pipefail -c "env LEAN_ABORT_ON_PANIC=1 lake build --wfail -KCI" | ||
- name: print the sizes of the oleans | ||
run: | | ||
du .lake/build/lib/Mathlib || echo "This code should be unreachable" | ||
- name: upload cache | ||
# We only upload the cache if the build started (whether succeeding, failing, or cancelled) | ||
# but not if any earlier step failed or was cancelled. | ||
|
@@ -240,23 +253,33 @@ jobs: | |
python3 scripts/yaml_check.py docs/100.yaml docs/overview.yaml docs/undergrad.yaml | ||
lake exe check-yaml | ||
- name: verify `lake exe graph` works | ||
run: | | ||
lake exe graph | ||
rm import_graph.dot | ||
- name: generate our import graph | ||
run: lake exe graph | ||
|
||
- name: upload the import graph | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: import-graph | ||
path: import_graph.dot | ||
## the default is 90, but we build often, so unless there's a reason | ||
## to care about old copies in the future, just say 7 days for now | ||
retention-days: 7 | ||
|
||
- name: clean up the import graph file | ||
run: rm import_graph.dot | ||
|
||
- name: build everything | ||
# make sure everything is available for test/import_all.lean | ||
run: | | ||
lake build Batteries Qq Aesop ProofWidgets | ||
lake build Batteries Qq Aesop ProofWidgets Plausible | ||
- name: test mathlib | ||
id: test | ||
uses: liskin/gh-problem-matcher-wrap@v3 | ||
with: | ||
linters: gcc | ||
run: | ||
lake test | ||
lake --iofail test | ||
|
||
- name: check for unused imports | ||
id: shake | ||
|
@@ -287,13 +310,30 @@ jobs: | |
BUILD_OUTCOME: ${{ steps.build.outcome }} | ||
NOISY_OUTCOME: ${{ steps.noisy.outcome }} | ||
ARCHIVE_OUTCOME: ${{ steps.archive.outcome }} | ||
COUNTEREXAMPLE_OUTCOME: ${{ steps.counterexamples.outcome }} | ||
COUNTEREXAMPLES_OUTCOME: ${{ steps.counterexamples.outcome }} | ||
LINT_OUTCOME: ${{ steps.lint.outcome }} | ||
TEST_OUTCOME: ${{ steps.test.outcome }} | ||
run: | | ||
scripts/lean-pr-testing-comments.sh lean | ||
scripts/lean-pr-testing-comments.sh batteries | ||
- name: build lean4checker, but don't run it | ||
if: ${{ (always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }} | ||
run: | | ||
git clone https://github.com/leanprover/lean4checker | ||
cd lean4checker | ||
# Read lean-toolchain file and checkout appropriate branch | ||
TOOLCHAIN=$(cat ../lean-toolchain) | ||
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then | ||
VERSION=${TOOLCHAIN#leanprover/lean4:} | ||
git checkout "$VERSION" | ||
else | ||
git checkout master | ||
fi | ||
# Build lean4checker using the same toolchain | ||
cp ../lean-toolchain . | ||
lake build | ||
final: | ||
name: Post-CI jobJOB_NAME | ||
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib4' | ||
|
@@ -303,7 +343,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
|
||
- id: PR | ||
uses: 8BitJonny/gh-get-current-pr@2.2.0 | ||
uses: 8BitJonny/gh-get-current-pr@3.0.0 | ||
# TODO: this may not work properly if the same commit is pushed to multiple branches: | ||
# https://github.com/8BitJonny/gh-get-current-pr/issues/8 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 # Specifies the version of the Dependabot configuration file format | ||
|
||
updates: | ||
# Configuration for dependency updates | ||
- package-ecosystem: "github-actions" # Specifies the ecosystem to check for updates | ||
directory: "/" # Specifies the directory to check for dependencies; "/" means the root directory | ||
schedule: | ||
# Check for updates to GitHub Actions every month | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.