Repository: chipsalliance/f4pga-sdf-timing (language: python)

Issue:
Add license checking github action
https://github.com/SymbiFlow/actions/tree/main/checks

Should probably replace the scripts at;
 - https://github.com/SymbiFlow/python-sdf-timing/blob/master/.github/check_license.sh
 - https://github.com/SymbiFlow/python-sdf-timing/blob/master/.github/check_python_scripts.sh


Discussion / hints:
Example at https://github.com/SymbiFlow/symbiflow-rr-graph/blob/master/.github/workflows/licensing.yml

<blockquote><img src="https://repository-images.githubusercontent.com/266733513/f9abd700-8803-11eb-8751-66c89c622ce8" width="48" align="right"><div><img src="https://github.githubassets.com/favicons/favicon.svg" height="14"> GitHub</div><div><strong><a href="https://github.com/SymbiFlow/symbiflow-rr-graph">SymbiFlow/symbiflow-rr-graph</a></strong></div><div>Collection of Routing Resources Graph (RR Graph) libraries for VPR - SymbiFlow/symbiflow-rr-graph</div></blockquote>

Fix patch:
diff --git a/.github/check_license.sh b/.github/check_license.sh
deleted file mode 100755
index 47b4cef..0000000
--- a/.github/check_license.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (C) 2017-2020  The SymbiFlow Authors.
-#
-# Use of this source code is governed by a ISC-style
-# license that can be found in the LICENSE file or at
-# https://opensource.org/licenses/ISC
-#
-# SPDX-License-Identifier: ISC
-
-echo
-echo "==========================="
-echo "Check SPDX identifier"
-echo "==========================="
-echo
-
-ERROR_FILES=""
-FILES_TO_CHECK=`find . \
-    -size +0 -type f \( -name '*.sh' -o -name '*.py' -o -name 'Makefile' \) \
-    \( -not -path "*/.*/*" -not -path "*/third_party/*" \)`
-
-for file in $FILES_TO_CHECK; do
-    echo "Checking $file"
-    grep -q "SPDX-License-Identifier" $file || ERROR_FILES="$ERROR_FILES $file"
-done
-
-if [ ! -z "$ERROR_FILES" ]; then
-    for file in $ERROR_FILES; do
-        echo "ERROR: $file does not have license information."
-    done
-    exit 1
-fi
-
-echo
-echo "==========================="
-echo "Check third party LICENSE"
-echo "==========================="
-echo
-
-function check_if_submodule {
-    for submodule in `git submodule --quiet foreach 'echo $sm_path'`; do
-        if [ "$1" == "$submodule" ]; then
-            return 1
-        fi
-    done
-}
-
-THIRD_PARTY_DIRS=""
-if [[ -e third_party ]]; then
-    THIRD_PARTY_DIRS=`ls -d third_party/*`
-fi
-ERROR_NO_LICENSE=""
-
-for dir in $THIRD_PARTY_DIRS; do
-    # Checks if we are not in a submodule
-    if check_if_submodule $dir; then
-        echo "Checking $dir"
-        [ -f $dir/LICENSE ] || ERROR_NO_LICENSE="$ERROR_NO_LICENSE $dir"
-    fi
-done
-
-if [ ! -z "$ERROR_NO_LICENSE" ]; then
-    for dir in $ERROR_NO_LICENSE; do
-        echo "ERROR: $dir does not have the LICENSE file."
-    done
-    exit 1
-fi
diff --git a/.github/check_python_scripts.sh b/.github/check_python_scripts.sh
deleted file mode 100755
index f4e9d23..0000000
--- a/.github/check_python_scripts.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (C) 2017-2020  The SymbiFlow Authors.
-#
-# Use of this source code is governed by a ISC-style
-# license that can be found in the LICENSE file or at
-# https://opensource.org/licenses/ISC
-#
-# SPDX-License-Identifier: ISC
-
-echo
-echo "==================================="
-echo "Check Python UTF coding and shebang"
-echo "==================================="
-echo
-
-ERROR_FILES_SHEBANG=""
-ERROR_FILES_UTF_CODING=""
-FILES_TO_CHECK=`find . \
-    -size +0 -type f \( -name '*.py' \) \
-    \( -not -path "*/.*/*" -not -path "*/third_party/*" -not -path "*/env/*" \)`
-
-for file in $FILES_TO_CHECK; do
-    echo "Checking $file"
-    if [[ -x $file ]]; then
-        grep -q "\#\!/usr/bin/env python3" $file || ERROR_FILES_SHEBANG="$ERROR_FILES_SHEBANG $file"
-    fi
-    grep -q "\#.*coding: utf-8" $file || ERROR_FILES_UTF_CODING="$ERROR_FILES_UTF_CODING $file"
-done
-
-if [ ! -z "$ERROR_FILES_SHEBANG" ]; then
-    for file in $ERROR_FILES_SHEBANG; do
-        echo "ERROR: $file does not have the python3 shebang."
-    done
-    exit 1
-fi
-
-if [ ! -z "$ERROR_FILES_UTF_CODING" ]; then
-    for file in $ERROR_FILES_UTF_CODING; do
-        echo "ERROR: $file does not have the UTF encoding set."
-	echo "Add # coding: utf-8"
-    done
-    exit 1
-fi
-
-echo


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ac4d012..65ee42c 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,3 +1,11 @@
+# Copyright (C) 2017-2021  The SymbiFlow Authors.
+#
+# Use of this source code is governed by a ISC-style
+# license that can be found in the LICENSE file or at
+# https://opensource.org/licenses/ISC
+#
+# SPDX-License-Identifier: ISC
+
 name: CI
 
 on: [push, pull_request]
@@ -8,10 +16,5 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v2
-    - name: License check
-      run: |
-        bash .github/check_license.sh
 
-    - name: Check python scripts
-      run: |
-        bash .github/check_python_scripts.sh
+    - uses: SymbiFlow/actions/checks@main