From 765da6f68d607fff5c4bef2b4d729805abb3e862 Mon Sep 17 00:00:00 2001 From: koide3 <31344317+koide3@users.noreply.github.com> Date: Thu, 27 Jun 2024 12:06:17 +0900 Subject: [PATCH] CI for license check (#78) * license check CI * fix ci * check both headers and source * add SPDX identifiers * trigger on only master --- .github/workflows/license.yml | 21 ++++++++++++++++++++ include/small_gicp/ann/flat_container.hpp | 2 ++ include/small_gicp/ann/knn_result.hpp | 2 ++ include/small_gicp/factors/robust_kernel.hpp | 2 ++ 4 files changed, 27 insertions(+) create mode 100644 .github/workflows/license.yml diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 0000000..96e3d92 --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,21 @@ +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' \ No newline at end of file diff --git a/include/small_gicp/ann/flat_container.hpp b/include/small_gicp/ann/flat_container.hpp index 4f0b4bd..f16bde3 100644 --- a/include/small_gicp/ann/flat_container.hpp +++ b/include/small_gicp/ann/flat_container.hpp @@ -1,3 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2024 Kenji Koide +// SPDX-License-Identifier: MIT #pragma once #include diff --git a/include/small_gicp/ann/knn_result.hpp b/include/small_gicp/ann/knn_result.hpp index 757ab8d..53ee375 100644 --- a/include/small_gicp/ann/knn_result.hpp +++ b/include/small_gicp/ann/knn_result.hpp @@ -1,3 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2024 Kenji Koide +// SPDX-License-Identifier: MIT #pragma once #include diff --git a/include/small_gicp/factors/robust_kernel.hpp b/include/small_gicp/factors/robust_kernel.hpp index 0b27d54..9af6a8a 100644 --- a/include/small_gicp/factors/robust_kernel.hpp +++ b/include/small_gicp/factors/robust_kernel.hpp @@ -1,3 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2024 Kenji Koide +// SPDX-License-Identifier: MIT #pragma once #include