Update Changes #75
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Hygiene | |
| on: | |
| push: | |
| branches: | |
| - '4.**' | |
| - '5.**' | |
| - 'trunk' | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| # Restrict the CAMLCI_GITHUB_TOKEN | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| hygiene: | |
| name: Checks | |
| runs-on: ubuntu-26.04 | |
| 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@v6 | |
| with: | |
| fetch-depth: 50 | |
| persist-credentials: false | |
| - name: Changes updated | |
| run: >- | |
| tools/ci/actions/check-changes-modified.sh | |
| "$CAMLCI_PR_ISSUE_URL" | |
| "$CAMLCI_GITHUB_REF_NAME" | |
| 'pull_request' | |
| "$CAMLCI_PR_BASE_REF" | |
| "$CAMLCI_PR_BASE_SHA" | |
| "$CAMLCI_PR_HEAD_REF" | |
| "$CAMLCI_PR_HEAD_SHA" | |
| env: | |
| # Prefix CAMLCI used here to avoid colliding with Github variables, | |
| # such as GITHUB_REF_NAME, as they always take precedence | |
| CAMLCI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CAMLCI_PR_ISSUE_URL: ${{ github.event.pull_request.issue_url }} | |
| CAMLCI_GITHUB_REF_NAME: ${{ github.ref }} | |
| CAMLCI_PR_BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| CAMLCI_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| CAMLCI_PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| CAMLCI_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| if: github.event_name == 'pull_request' | |
| - name: configure correctly generated | |
| run: >- | |
| tools/ci/actions/check-configure.sh | |
| "$CAMLCI_GITHUB_REF_NAME" | |
| "$CAMLCI_EVENT_NAME" | |
| "$CAMLCI_PR_BASE_REF" | |
| "$CAMLCI_PR_BASE_SHA" | |
| "$CAMLCI_PR_HEAD_REF" | |
| "$CAMLCI_PR_HEAD_SHA" | |
| "$CAMLCI_EVENT_REF" | |
| "$CAMLCI_EVENT_BEFORE" | |
| "$CAMLCI_EVENT_REF" | |
| "$CAMLCI_EVENT_AFTER" | |
| env: | |
| CAMLCI_GITHUB_REF_NAME: ${{ github.ref }} | |
| CAMLCI_EVENT_NAME: ${{ github.event_name }} | |
| CAMLCI_PR_BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| CAMLCI_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| CAMLCI_PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| CAMLCI_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| CAMLCI_EVENT_REF: ${{ github.event.ref }} | |
| CAMLCI_EVENT_BEFORE: ${{ github.event.before }} | |
| CAMLCI_EVENT_AFTER: ${{ 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 | |
| "$CAMLCI_GITHUB_REF_NAME" | |
| "$CAMLCI_EVENT_NAME" | |
| "$CAMLCI_PR_BASE_REF" | |
| "$CAMLCI_PR_BASE_SHA" | |
| "$CAMLCI_PR_HEAD_REF" | |
| "$CAMLCI_PR_HEAD_SHA" | |
| "$CAMLCI_EVENT_REF" | |
| "$CAMLCI_EVENT_BEFORE" | |
| "$CAMLCI_EVENT_REF" | |
| "$CAMLCI_EVENT_AFTER" | |
| env: | |
| # Prefix CAMLCI used here to avoid GITHUB_REF_NAME colliding | |
| CAMLCI_GITHUB_REF_NAME: ${{ github.ref }} | |
| CAMLCI_EVENT_NAME: ${{ github.event_name }} | |
| CAMLCI_PR_BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| CAMLCI_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| CAMLCI_PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| CAMLCI_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| CAMLCI_EVENT_REF: ${{ github.event.ref }} | |
| CAMLCI_EVENT_BEFORE: ${{ github.event.before }} | |
| CAMLCI_EVENT_AFTER: ${{ 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() |