-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (71 loc) · 2.02 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:
description: "What index to use"
type: choice
options:
# Use the current state of the index repository (i.e., reservoir-index)
- current
# Update the index repository and then use it
- updated
# Create and use a small local index artifact (e.g., for testing)
- local
required: true
default: current
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 reservoir-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 || inputs.index != 'current')
uses: ./.github/workflows/index.yaml
secrets: inherit
with:
update-index: ${{ inputs.index == 'updated' }}
testbed:
needs: index
# Run even if `index` is skipped
if: (!failure() && !cancelled())
name: Testbed
uses: ./.github/workflows/testbed.yaml
with:
index-artifact: ${{ !inputs.index || inputs.index == 'local' }}
toolchain: ${{ inputs.toolchain }}
testbed-size: ${{ inputs.testbed-size }}
update-index: ${{ inputs.save-testbed }}
pages:
needs: [index, testbed]
# Run even if `index` is skipped
if: (!failure() && !cancelled())
name: Pages
uses: ./.github/workflows/pages.yaml
secrets: inherit
with:
index-artifact: ${{ !inputs.index || inputs.index == 'local' }}