Skip to content

Commit 371e19c

Browse files
authored
ツール Licensed を使って、push時にsubmoduleのライセンスチェックが自動で走るようにしました。 (Synesthesias#154)
* licensed導入中 * licensed導入 * licensedの設定ファイルを整備 * licensedのgithub ciを構築中 * 同上 * 同上 * 同上. * licensedチェックが駄目な時に失敗することの確認 * 同上 * 失敗検出OKなので元に戻す
1 parent b170cd8 commit 371e19c

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# licensed というツールを使って submodule のライセンスをチェックします。
2+
# このCIに失敗する場合、 .licensed.yml という名前のファイルを見直してください。
3+
4+
# 参考 : licensed について
5+
# https://github.com/github/licensed
6+
7+
# 参考 : licensed の CI 利用について
8+
# https://github.com/marketplace/actions/setup-github-licensed
9+
10+
name: Check Submodule License
11+
12+
on:
13+
push:
14+
workflow_dispatch:
15+
16+
jobs:
17+
check-submodule-license:
18+
runs-on: ubuntu-20.04
19+
20+
steps:
21+
22+
- uses: actions/checkout@v3
23+
24+
- name: checkout submodules
25+
shell: bash
26+
run: git submodule update --init --recursive
27+
28+
- uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ruby
31+
32+
- uses: jonabc/setup-licensed@v1
33+
with:
34+
version: '4.x'
35+
36+
- run: licensed cache
37+
- run: licensed status

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# fbx_sdk は再配布禁止のため、ご自分で用意していただく形になります。
33
/3rdparty/fbx_sdk/
44

5+
# licensed ツールのキャッシュフォルダです。
6+
.licenses/*
7+
58
CMakeLists.txt.user
69
CMakeCache.txt
710
CMakeFiles

.licensed.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# submodule のライセンスをチェックする licensed というツールの設定ファイルです。
2+
3+
allowed:
4+
- mit
5+
- bsd-2-clause
6+
- bsd-3-clause
7+
- cc0-1.0
8+
- apache-2.0
9+
10+
reviewed:
11+
git_submodule:
12+
- libxml2 # MITライセンスなのでOK
13+
- openssl-cmake # 再配布可能、要著作権表示
14+
- pybind11 # BSD-3ライセンスなのでOK
15+
- zlib # 再配布可能、要ライセンス表示
16+
- libcitygml # LGPLライセンス、改変部分をpublicリポジトリで公開しているのでOK

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6+
7+
# gem "rails"
8+
9+
# Submoduleのライセンスを確認するためのツールです。
10+
gem 'licensed', :group => 'development'

Gemfile.lock

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.1)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
dotenv (2.8.1)
7+
faraday (2.7.4)
8+
faraday-net_http (>= 2.0, < 3.1)
9+
ruby2_keywords (>= 0.0.4)
10+
faraday-net_http (3.0.2)
11+
json (2.6.3)
12+
licensed (4.3.0)
13+
json (~> 2.6)
14+
licensee (~> 9.16)
15+
parallel (~> 1.22)
16+
pathname-common_prefix (~> 0.0.1)
17+
reverse_markdown (~> 2.1)
18+
ruby-xxHash (~> 0.4.0)
19+
thor (~> 1.2)
20+
tomlrb (~> 2.0)
21+
licensee (9.16.0)
22+
dotenv (~> 2.0)
23+
octokit (>= 4.20, < 7.0)
24+
reverse_markdown (>= 1, < 3)
25+
rugged (>= 0.24, < 2.0)
26+
thor (>= 0.19, < 2.0)
27+
nokogiri (1.14.2-arm64-darwin)
28+
racc (~> 1.4)
29+
octokit (6.1.0)
30+
faraday (>= 1, < 3)
31+
sawyer (~> 0.9)
32+
parallel (1.22.1)
33+
pathname-common_prefix (0.0.1)
34+
public_suffix (5.0.1)
35+
racc (1.6.2)
36+
reverse_markdown (2.1.1)
37+
nokogiri
38+
ruby-xxHash (0.4.0.2)
39+
ruby2_keywords (0.0.5)
40+
rugged (1.6.3)
41+
sawyer (0.9.2)
42+
addressable (>= 2.3.5)
43+
faraday (>= 0.17.3, < 3)
44+
thor (1.2.1)
45+
tomlrb (2.0.3)
46+
47+
PLATFORMS
48+
arm64-darwin-21
49+
50+
DEPENDENCIES
51+
licensed
52+
53+
BUNDLED WITH
54+
2.4.6

0 commit comments

Comments
 (0)