forked from let-def/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (85 loc) · 3.28 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
name: Hygiene
on:
push:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
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@v2
with:
fetch-depth: 50
- name: Changes updated
run: >-
tools/ci/actions/check-changes-modified.sh
'${{ 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 }}'
if: >-
!contains(github.event.pull_request.labels.*.name, 'no-change-entry-needed')
&& 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-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()