-
Notifications
You must be signed in to change notification settings - Fork 15
73 lines (61 loc) · 2.14 KB
/
nolints.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: update nolints
on:
workflow_dispatch: ~
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build, lint and update nolints
runs-on: ubuntu-latest
env:
# number of commits to check for olean cache
GIT_HISTORY_DEPTH: 20
steps:
- uses: actions/checkout@v2
with:
fetch-depth: ${{ env.GIT_HISTORY_DEPTH }}
# We need to use a personal access token here. See the comment in upgrade_lean.yml.
token: ${{ secrets.PA_TOKEN }}
- name: install elan
run: |
set -o pipefail
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- --default-toolchain none -y
~/.elan/bin/lean --version
echo "$HOME/.elan/bin" >> $GITHUB_PATH
echo "name=short_lean_version::$(~/.elan/bin/lean --run scripts/lean_version.lean)" >> $GITHUB_ENV
- name: install Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: install mathlibtools
run: python -m pip install --upgrade pip mathlibtools
- name: leanpkg configure
run: leanpkg configure
- name: get mathlib cache
run: leanproject get-mathlib-cache || true
- name: try to find olean cache
continue-on-error: true
run: ./scripts/fetch_olean_cache.sh
- name: leanpkg build
id: build
run: |
leanpkg configure
lean --json --make src | python scripts/detect_errors.py
- name: lint
run: |
./scripts/mk_all.sh
lean --run ./scripts/lint_project.lean || true
if [[ ! -e nolints.txt ]]; then
echo "Error during linting - could not generate nolints.txt"
exit 1
fi
mv nolints.txt scripts/nolints.txt
# ./scripts/update-style-exceptions.sh
git diff
- name: configure git user
run: |
git config user.email "[email protected]"
git config user.name "leanprover-community-bot"
git config pull.rebase true
- name: update nolints.txt
run: ./scripts/update_nolints.sh