|
| 1 | +name: Build project |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main # Trigger on pushes to the default branch |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + workflow_dispatch: # Allow manual triggering of the workflow from the GitHub Actions interface |
| 11 | + |
| 12 | +# Cancel previous runs if a new commit is pushed to the same PR or branch |
| 13 | +concurrency: |
| 14 | + group: ${{ github.ref }} # Group runs by the ref (branch or PR) |
| 15 | + cancel-in-progress: true # Cancel any ongoing runs in the same group |
| 16 | + |
| 17 | +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
| 18 | +permissions: |
| 19 | + contents: write # Push the provenance ledger back to the branch (see the step that does) |
| 20 | + pages: write # Write access to GitHub Pages |
| 21 | + id-token: write # Write access to ID tokens |
| 22 | + issues: write # Write access to issues |
| 23 | + pull-requests: write # Write access to pull requests |
| 24 | + actions: read # Read the previous run's artifact, for the referee revision diff |
| 25 | + |
| 26 | +jobs: |
| 27 | + build_project: |
| 28 | + runs-on: ubuntu-latest |
| 29 | + name: Build project |
| 30 | + steps: |
| 31 | + - name: Cleanup to free disk space |
| 32 | + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.0 |
| 33 | + with: |
| 34 | + tool-cache: false |
| 35 | + android: true # saves approximately 12 GB |
| 36 | + dotnet: false |
| 37 | + haskell: false |
| 38 | + large-packages: false |
| 39 | + docker-images: false |
| 40 | + swap-storage: false |
| 41 | + |
| 42 | + - name: Checkout project |
| 43 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 44 | + with: |
| 45 | + # Load-bearing for provenance, not just a convenience: the ledger's edit half is |
| 46 | + # `git blame`, and at the default `fetch-depth: 1` blame attributes the entire library to |
| 47 | + # the single fetched commit. |
| 48 | + fetch-depth: 0 # Fetch all history for all branches and tags |
| 49 | + |
| 50 | + - name: Build and lint project |
| 51 | + uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0 |
| 52 | + with: |
| 53 | + build: true |
| 54 | + build-args: "--wfail" |
| 55 | + lint: true |
| 56 | + mk_all-check: true |
0 commit comments