File: hygiene.yml

package info (click to toggle)
ocaml 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 44,372 kB
  • sloc: ml: 370,196; ansic: 52,820; sh: 27,396; asm: 5,462; makefile: 3,679; python: 974; awk: 278; javascript: 273; perl: 59; fortran: 21; cs: 9
file content (115 lines) | stat: -rw-r--r-- 3,913 bytes parent folder | download | duplicates (2)
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
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@v4
        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: 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
        id: 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'
            && (github.event.ref == 'refs/heads/trunk'
                || startsWith(github.event.ref, 'refs/heads/4.')
                || startsWith(github.event.ref, 'refs/heads/5.')))
            || steps.revered.outputs.full_check_needed == 'true')
          && 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()