forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (112 loc) · 4.2 KB
/
hygiene.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Hygiene
on:
push:
branches:
- '4.**'
- '5.**'
- 'trunk'
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
# Restrict the GITHUB_TOKEN
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
hygiene:
name: Checks
runs-on: ubuntu-latest
steps:
- name: GitHub Context
run: echo $GITHUB_CONTEXT
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
# Comment out the line below to enable (debugging) display of the github
# context variable.
if: failure()
- uses: actions/checkout@v3
with:
fetch-depth: 50
persist-credentials: false
- name: Changes updated
run: >-
tools/ci/actions/check-changes-modified.sh
'${{ github.event.pull_request.issue_url }}'
'${{ github.ref }}'
'pull_request'
'${{ github.event.pull_request.base.ref }}'
'${{ github.event.pull_request.base.sha }}'
'${{ github.event.pull_request.head.ref }}'
'${{ github.event.pull_request.head.sha }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request'
- name: Parsetree updated
run: >-
tools/ci/actions/check-parsetree-modified.sh
'${{ github.event.pull_request.issue_url }}'
'${{ github.ref }}'
'pull_request'
'${{ github.event.pull_request.base.ref }}'
'${{ github.event.pull_request.base.sha }}'
'${{ github.event.pull_request.head.ref }}'
'${{ github.event.pull_request.head.sha }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request'
- name: configure correctly generated
run: >-
tools/ci/actions/check-configure.sh
'${{ github.ref }}'
'${{ github.event_name }}'
'${{ github.event.pull_request.base.ref }}'
'${{ github.event.pull_request.base.sha }}'
'${{ github.event.pull_request.head.ref }}'
'${{ github.event.pull_request.head.sha }}'
'${{ github.event.ref }}'
'${{ github.event.before }}'
'${{ github.event.ref }}'
'${{ github.event.after }}'
if: ${{ always() }}
- name: Check that no ignored files have been committed
run: tools/ci/actions/check-no-ignored-files.sh
if: ${{ always() }}
- name: check-typo revered
run: >-
tools/ci/actions/check-typo.sh
'${{ github.ref }}'
'${{ github.event_name }}'
'${{ github.event.pull_request.base.ref }}'
'${{ github.event.pull_request.base.sha }}'
'${{ github.event.pull_request.head.ref }}'
'${{ github.event.pull_request.head.sha }}'
'${{ github.event.ref }}'
'${{ github.event.before }}'
'${{ github.event.ref }}'
'${{ github.event.after }}'
if: ${{ always() }}
- name: check-typo on whole tree
run: tools/check-typo
if: >-
github.event_name == 'push'
&& (startsWith(github.event.ref, 'refs/heads/4.')
|| github.event.ref == 'refs/heads/trunk')
&& always()
- name: Check that labelled/unlabelled .mli files are in sync
run: tools/ci/actions/check-labelled-interfaces.sh
if: always()
# This step records the build success in the variable build-status,
# allowing the last two steps to skip, rather than go beserk with a
# faulty compiler.
- name: Build a minimal compiler for alldepend
id: compiler
run: tools/ci/actions/runner.sh basic-compiler
if: always()
- name: Check that dependency info is up-to-date
run: tools/ci/actions/check-alldepend.sh
if: steps.compiler.outputs.build-status == 'success' && always()
- name: Check global structure of the reference manual
run: |
# Required configuration info is left-over from the previous step
make -C manual/tests check-stdlib check-case-collision
if: steps.compiler.outputs.build-status == 'success' && always()