-
Notifications
You must be signed in to change notification settings - Fork 10
74 lines (63 loc) · 2.05 KB
/
Copy pathpush.yml
File metadata and controls
74 lines (63 loc) · 2.05 KB
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
74
name: Build Lean project
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
style_lint:
name: Lint style
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Don't 'import Mathlib', use precise imports
if: always()
run: |
! (find APAP -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import Mathlib$')
- name: Files in APAP.Mathlib can't import APAP files outside APAP.Mathlib
run: |
! (find APAP/Mathlib -name "*.lean" -type f -print0 | xargs -0 grep -E -n '^import APAP.(?!Mathlib)')
build:
name: Build project
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Build and lint the project
id: build-lean
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # v1.2.0
- name: Copy README.md to website/index.md
if: github.ref == 'refs/heads/master'
run: cp README.md website/index.md
- name: Upstreaming dashboard
if: github.ref == 'refs/heads/master'
uses: leanprover-community/upstreaming-dashboard-action@main
with:
website-directory: ./website
project-name: APAP
include-drafts: true
branch-name: master
- name: File dependencies
if: github.ref == 'refs/heads/master'
run: |
sudo apt-get update
sudo apt install graphviz -y
~/.elan/bin/lake exe graph website/file_deps.pdf
- name: Build project documentation
if: github.ref == 'refs/heads/master'
id: build-docgen
uses: leanprover-community/docgen-action@main
with:
blueprint: true
homepage: "website"