diff --git a/.github/check-license-headers.yaml b/.github/check-license-headers.yaml new file mode 100644 index 000000000..9837b1026 --- /dev/null +++ b/.github/check-license-headers.yaml @@ -0,0 +1,38 @@ +[ + { + "include": [ + "**/**/*.rs" + ], + "exclude": [ + "target/**", + "*/LICENSE*", + "LICENSE.md", + "RELEASE.md", + "rpc/**", + "README*", + "*/README*", + "Cargo.toml", + "*/Cargo.toml", + "libaio/**", + "docs/**", + "CODEOWNERS" + ], + "license": "./.github/license-header.txt" + }, + { + "include": [ + "target/**", + "*/LICENSE*", + "LICENSE.md", + "RELEASE.md", + "rpc/**", + "README*", + "*/README*", + "Cargo.toml", + "*/Cargo.toml", + "libaio/**", + "docs/**", + "CODEOWNERS" + ], + } +] diff --git a/.github/license-header.txt b/.github/license-header.txt new file mode 100644 index 000000000..bb72d440a --- /dev/null +++ b/.github/license-header.txt @@ -0,0 +1,2 @@ +// Copyright (C) %year%, Ava Labs, Inc. All rights reserved. +// See the file LICENSE.md for licensing terms. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e18c5371d..e26b9094d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,6 +80,12 @@ jobs: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - uses: arduino/setup-protoc@v2 + - name: Check license headers + uses: viperproject/check-license-header@v2 + with: + path: . + config: .github/check-license-headers.yaml + strict: true - name: Restore Check Deps id: cache-build-deps-restore uses: actions/cache/restore@v3