-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
961 changed files
with
7,608 additions
and
4,454 deletions.
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
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
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,81 @@ | ||
name: update nolints | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
|
||
jobs: | ||
build: | ||
name: Build, lint and update nolints and style exceptions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: cleanup | ||
run: | | ||
find . -name . -o -prune -exec rm -rf -- {} + | ||
# The Hoskinson runners may not have jq installed, so do that now. | ||
- name: 'Setup jq' | ||
uses: dcarbone/[email protected] | ||
|
||
- name: install elan | ||
run: | | ||
set -o pipefail | ||
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.0.0/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./elan-init -y --default-toolchain none | ||
echo "$HOME/.elan/bin" >> "$GITHUB_PATH" | ||
- uses: actions/checkout@v3 | ||
|
||
- name: print lean and lake versions | ||
run: | | ||
lean --version | ||
lake --version | ||
- name: prune ProofWidgets .lake | ||
run: | | ||
# 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. | ||
# See discussion at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/nightly-testing/near/411225235 | ||
rm -rf .lake/packages/proofwidgets/.lake/build/lib | ||
rm -rf .lake/packages/proofwidgets/.lake/build/ir | ||
- name: get cache | ||
run: | | ||
lake exe cache clean | ||
lake exe cache get | ||
- name: build mathlib | ||
id: build | ||
uses: liskin/gh-problem-matcher-wrap@v2 | ||
with: | ||
linters: gcc | ||
run: | | ||
bash -o pipefail -c "env LEAN_ABORT_ON_PANIC=1 lake build -KCI | tee stdout.log" | ||
- name: lint mathlib | ||
id: lint | ||
uses: liskin/gh-problem-matcher-wrap@v2 | ||
with: | ||
linters: gcc | ||
run: | | ||
env LEAN_ABORT_ON_PANIC=1 lake exe runLinter Mathlib | ||
mv nolints.json scripts/nolints.json | ||
./scripts/update-style-exceptions.sh | ||
git diff | ||
- name: configure git setup | ||
run: | | ||
git remote add origin-bot "https://leanprover-community-bot:${{ secrets.UPDATE_NOLINTS_TOKEN }}@github.com/leanprover-community/mathlib.git" | ||
git config user.email "[email protected]" | ||
git config user.name "leanprover-community-bot" | ||
# By default, github actions overrides the credentials used to access any | ||
# github url so that it uses the github-actions[bot] user. We want to access | ||
# github using a different username. | ||
git config --unset http.https://github.com/.extraheader | ||
- name: update nolints.json and style-exceptions.txt | ||
run: ./scripts/update_nolints_CI.sh | ||
env: | ||
DEPLOY_GITHUB_TOKEN: ${{ secrets.UPDATE_NOLINTS_TOKEN }} |
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
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
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
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
Oops, something went wrong.