name: "Check Sourcecode"

on:
  push:
    branches-ignore:
      - 'onlinedocs'
  pull_request:
    branches-ignore:
      - 'onlinedocs'

jobs:

  check-sourcecode:
    name: "Check Sourcecode"
    runs-on: ubuntu-latest

    steps:

      - uses: actions/checkout@v4

      # - name: Install prerequisites

      - name: "Check the sourcecode"
        run: ./tools/check-sourcecode

  check-generated:
    name: "Check Generated Files"
    runs-on: ubuntu-latest

    steps:

      - uses: actions/checkout@v4

      - name: Install prerequisites
        run: >-
          sudo apt-get update

          sudo apt-get install -y
          asciidoctor

      - name: "Verify elf2tag.1 consistency"
        run: ./src/update-elf2tag-manpage --verify
