name: license

on:
  push:
    branches: [ master ]
    paths-ignore: '**.md'
  pull_request:
    branches: [ master ]
    paths-ignore: '**.md'

jobs:
  license_check:
    name: License check
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Check license
        run: |
          find include/small_gicp src/small_gicp -type f | xargs -I filename bash -c 'if ! grep -q SPDX-License-Identifier filename; then echo filename : lisence not found; exit 1; fi'