Debian Codegraph @

.github/workflows/hygiene.yml

raw
1 name: Hygiene
2 on:
3 push:
4 branches:
5 - '4.**'
6 - '5.**'
7 - 'trunk'
8 pull_request:
9 types: [opened, synchronize, reopened, labeled, unlabeled]
10
11 # Restrict the GITHUB_TOKEN
12 permissions: {}
13
14 concurrency:
15 group: ${{ github.workflow }}-${{ github.ref }}
16 cancel-in-progress: true
17
18 jobs:
19 hygiene:
20 name: Checks
21 runs-on: ubuntu-latest
22 steps:
23 - name: GitHub Context
24 run: echo $GITHUB_CONTEXT
25 env:
26 GITHUB_CONTEXT: ${{ toJson(github) }}
27 # Comment out the line below to enable (debugging) display of the github
28 # context variable.
29 if: failure()
30
31 - uses: actions/checkout@v5
32 with:
33 fetch-depth: 50
34 persist-credentials: false
35
36 - name: Changes updated
37 run: >-
38 tools/ci/actions/check-changes-modified.sh
39 '${{ github.event.pull_request.issue_url }}'
40 '${{ github.ref }}'
41 'pull_request'
42 '${{ github.event.pull_request.base.ref }}'
43 '${{ github.event.pull_request.base.sha }}'
44 '${{ github.event.pull_request.head.ref }}'
45 '${{ github.event.pull_request.head.sha }}'
46 env:
47 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 if: github.event_name == 'pull_request'
49
50 - name: configure correctly generated
51 run: >-
52 tools/ci/actions/check-configure.sh
53 '${{ github.ref }}'
54 '${{ github.event_name }}'
55 '${{ github.event.pull_request.base.ref }}'
56 '${{ github.event.pull_request.base.sha }}'
57 '${{ github.event.pull_request.head.ref }}'
58 '${{ github.event.pull_request.head.sha }}'
59 '${{ github.event.ref }}'
60 '${{ github.event.before }}'
61 '${{ github.event.ref }}'
62 '${{ github.event.after }}'
63 if: ${{ always() }}
64
65 - name: Check that no ignored files have been committed
66 run: tools/ci/actions/check-no-ignored-files.sh
67 if: ${{ always() }}
68
69 - name: check-typo revered
70 id: revered
71 run: >-
72 tools/ci/actions/check-typo.sh
73 '${{ github.ref }}'
74 '${{ github.event_name }}'
75 '${{ github.event.pull_request.base.ref }}'
76 '${{ github.event.pull_request.base.sha }}'
77 '${{ github.event.pull_request.head.ref }}'
78 '${{ github.event.pull_request.head.sha }}'
79 '${{ github.event.ref }}'
80 '${{ github.event.before }}'
81 '${{ github.event.ref }}'
82 '${{ github.event.after }}'
83 if: ${{ always() }}
84
85 - name: check-typo on whole tree
86 run: tools/check-typo
87 if: >-
88 ((github.event_name == 'push'
89 && (github.event.ref == 'refs/heads/trunk'
90 || startsWith(github.event.ref, 'refs/heads/4.')
91 || startsWith(github.event.ref, 'refs/heads/5.')))
92 || steps.revered.outputs.full_check_needed == 'true')
93 && always()
94
95 - name: Check that labelled/unlabelled .mli files are in sync
96 run: tools/ci/actions/check-labelled-interfaces.sh
97 if: always()
98
99 # This step records the build success in the variable build-status,
100 # allowing the last two steps to skip, rather than go beserk with a
101 # faulty compiler.
102 - name: Build a minimal compiler for alldepend
103 id: compiler
104 run: tools/ci/actions/runner.sh basic-compiler
105 if: always()
106
107 - name: Check that dependency info is up-to-date
108 run: tools/ci/actions/check-alldepend.sh
109 if: steps.compiler.outputs.build-status == 'success' && always()
110
111 - name: Check global structure of the reference manual
112 run: |
113 # Required configuration info is left-over from the previous step
114 make -C manual/tests check-stdlib check-case-collision
115 if: steps.compiler.outputs.build-status == 'success' && always()