docstrings added #65
This file contains hidden or 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
| name: Lean build | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Cache elan | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.elan | |
| key: ${{ runner.os }}-elan-${{ hashFiles('lean-toolchain') }} | |
| - name: Install Lean | |
| run: | | |
| curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y | |
| echo "$HOME/.elan/bin" >> $GITHUB_PATH | |
| - name: Install ripgrep | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ripgrep | |
| - name: Cache lake | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .lake | |
| build | |
| key: ${{ runner.os }}-lake-${{ hashFiles('lakefile.lean') }} | |
| - name: Update deps | |
| run: | | |
| for i in 1 2 3; do | |
| lake update && exit 0 | |
| echo "lake update failed, retry $i/3" | |
| sleep 10 | |
| done | |
| exit 1 | |
| - name: Build | |
| run: lake build | |
| - name: Detect package name | |
| id: package | |
| run: | | |
| pkg=$(sed -n 's/^name = "\(.*\)"/\1/p' lakefile.toml | head -n1) | |
| if [ -z "$pkg" ]; then | |
| echo "Could not detect package name from lakefile.toml" >&2 | |
| exit 1 | |
| fi | |
| echo "name=$pkg" >> "$GITHUB_OUTPUT" | |
| - name: Leanchecker | |
| run: lake env leanchecker --fresh "${{ steps.package.outputs.name }}" | |
| - name: Proof sanity check | |
| run: bash scripts/check-proof-sanity.sh |