-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (71 loc) · 2.05 KB
/
ci.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
74
name: CI
on:
push:
branches:
- master
- 'stage/**' # branch pattern for general changes
pull_request:
branches:
- master
# Enable running this workflow manually from the Actions tab
workflow_dispatch:
inputs:
index-repo:
description: "Registry index repository"
type: string
required: false
default: leanprover/reservoir-index
reindex:
description: "Reindex packages"
type: boolean
required: false
default: true
toolchain:
description: "Lean toolchain to test against"
type: string
required: false
testbed-size:
description: "Number of packages to test"
type: number
required: false
save-testbed:
description: "Save testbed results to index"
type: boolean
required: false
default: true
# GITHUB_TOKEN permissions needed for deployment (copied from pages.yaml)
permissions:
contents: read
deployments: none
pull-requests: write
statuses: write
jobs:
index:
name: Index
if: (!inputs.index-repo || inputs.reindex)
uses: ./.github/workflows/index.yaml
secrets: inherit
with:
repository: ${{ inputs.reindex && inputs.index-repo || '' }}
testbed:
needs: index
# Run even if `index` is skipped
if: (!failure() && !cancelled() && inputs.testbed-size != null)
name: Testbed
uses: ./.github/workflows/testbed.yaml
secrets: inherit
with:
index-repo: ${{ inputs.index-repo }}
testbed-size: ${{ inputs.testbed-size || (github.ref_name == 'master' && 200 || 0) }}
toolchain: ${{ inputs.toolchain }}
update-index: ${{ inputs.save-testbed == true }}
pages:
needs: [index, testbed]
# Run even if `index` or `testbed` is skipped
if: (!failure() && !cancelled())
name: Pages
uses: ./.github/workflows/pages.yaml
secrets: inherit
with:
index-repo: ${{ inputs.index-repo }}
testbed-artifact: ${{ !(inputs.index-repo && inputs.save-testbed) && inputs.testbed-size != null }}