diff --git a/.github/license_config.yml b/.github/license_config.yml new file mode 100644 index 000000000..b5bd58423 --- /dev/null +++ b/.github/license_config.yml @@ -0,0 +1,16 @@ +license: + main: apache-2.0 + report_missing: true + category: Permissive +copyright: + check: true +exclude: + extensions: + - yml + - yaml + - html + - rst + - conf + - cfg + langs: + - HTML diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml new file mode 100644 index 000000000..f2a407a14 --- /dev/null +++ b/.github/workflows/checkpatch.yml @@ -0,0 +1,29 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - name: checkpatch.pl PR review + uses: webispy/checkpatch-action@v8 + diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml new file mode 100644 index 000000000..bce1fb666 --- /dev/null +++ b/.github/workflows/license_check.yml @@ -0,0 +1,32 @@ +name: Scancode + +on: [pull_request] + +jobs: + scancode_job: + runs-on: ubuntu-20.04 + name: Scan code for licenses + steps: + - name: Checkout the code + uses: actions/checkout@v1 + - name: Scan the code + id: scancode + uses: zephyrproject-rtos/action_scancode@v4 + with: + directory-to-scan: 'scan/' + - name: Artifact Upload + uses: actions/upload-artifact@v1 + with: + name: scancode + path: ./artifacts + + - name: Verify + run: | + if [ -s ./artifacts/report.txt ]; then + report=$(cat ./artifacts/report.txt) + report="${report//'%'/'%25'}" + report="${report//$'\n'/'%0A'}" + report="${report//$'\r'/'%0D'}" + echo "::error file=./artifacts/report.txt::$report" + exit 1 + fi diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp index 34b77f5c2..062092471 100644 --- a/cores/arduino/main.cpp +++ b/cores/arduino/main.cpp @@ -6,7 +6,13 @@ #include "Arduino.h" +void func() { + printf("DO NOT MERGE!\n"); + return FALSE; +} + int main(void) { + func(); setup(); for (;;) { @@ -14,4 +20,4 @@ int main(void) { } return 0; -} \ No newline at end of file +}