mirror of
https://github.com/zama-ai/concrete.git
synced 2026-04-17 03:00:54 -04:00
ci: check if sources include license header
This commit is contained in:
7
.github/workflows/continuous-integration.yml
vendored
7
.github/workflows/continuous-integration.yml
vendored
@@ -28,6 +28,13 @@ jobs:
|
||||
- name: Format with clang-format
|
||||
run: .github/workflows/scripts/format_cpp.sh
|
||||
|
||||
CheckLicense:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check if sources include the license header
|
||||
run: .github/workflows/scripts/check_for_license.sh
|
||||
|
||||
BuildAndTest:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
||||
25
.github/workflows/scripts/check_for_license.sh
vendored
Executable file
25
.github/workflows/scripts/check_for_license.sh
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
print_and_exit() {
|
||||
echo "Need to add license header to file $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
files=$(find ./compiler/{include,lib,src} -iregex '^.*\.\(cpp\|cc\|h\|hpp\)$')
|
||||
|
||||
for file in $files
|
||||
do
|
||||
cmp <(head -n 4 $file) <(echo "// Part of the Concrete Compiler Project, under the BSD3 License with Zama
|
||||
// Exceptions. See
|
||||
// https://github.com/zama-ai/homomorphizer/blob/master/LICENSE.txt for license
|
||||
// information.") || print_and_exit $file
|
||||
done
|
||||
|
||||
files=$(find ./compiler/{include,lib,src} -iregex '^.*\.\(py\)$')
|
||||
|
||||
for file in $files
|
||||
do
|
||||
cmp <(head -n 2 $file) <(echo "# Part of the Concrete Compiler Project, under the BSD3 License with Zama Exceptions.
|
||||
# See https://github.com/zama-ai/homomorphizer/blob/master/LICENSE.txt for license information.") || print_and_exit $file
|
||||
done
|
||||
Reference in New Issue
Block a user