diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..abd750c --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: +ignore-words-list = , +check-filenames = +check-hidden = +skip = ./.git diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml new file mode 100644 index 0000000..4b3b6d5 --- /dev/null +++ b/.github/workflows/arduino-lint.yml @@ -0,0 +1,26 @@ +name: Arduino Lint +on: + push: + pull_request: + # Scheduled trigger checks for breakage caused by new rules added to Arduino Lint + schedule: + # run every Saturday at 3 AM UTC + - cron: "0 3 * * 6" + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch + workflow_dispatch: + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v1 + with: + official: true + library-manager: update diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..f7aa01d --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,69 @@ +name: Compile Examples + +on: + pull_request: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + push: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + # Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms) + schedule: + # run every Saturday at 3 AM UTC + - cron: "0 3 * * 6" + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch + workflow_dispatch: + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch + repository_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + env: + SKETCHES_REPORTS_PATH: sketches-reports + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:mbed:envie_m7 + - fqbn: arduino:megaavr:uno2018 + - fqbn: arduino:samd:mkr1000 + - fqbn: arduino:samd:mkrwifi1010 + - fqbn: arduino:samd:nano_33_iot + - fqbn: arduino:samd:mkrwan1300 + - fqbn: arduino:samd:mkrwan1310 + - fqbn: arduino:samd:mkrgsm1400 + - fqbn: arduino:samd:mkrnb1500 + - fqbn: arduino:samd:mkrvidor4000 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Compile examples + uses: arduino/compile-sketches@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: ${{ matrix.board.fqbn }} + libraries: | + # Install the library from the local path. + - source-path: ./ + # Additional library dependencies can be listed here. + # See: https://github.com/arduino/compile-sketches#libraries + sketch-paths: | + - ./examples/ + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save memory usage change report as artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ env.SKETCHES_REPORTS_PATH }} + path: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml new file mode 100644 index 0000000..c69650f --- /dev/null +++ b/.github/workflows/report-size-deltas.yml @@ -0,0 +1,21 @@ +name: Report Size Deltas + +on: + schedule: + - cron: '*/5 * * * *' + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch + workflow_dispatch: + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch + repository_dispatch: + +jobs: + report: + runs-on: ubuntu-latest + + steps: + # See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md + - name: Comment size deltas reports to PRs + uses: arduino/report-size-deltas@main + with: + # The name of the workflow artifact created by the "Compile Examples" workflow + sketches-reports-source: sketches-reports diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 0000000..7ad1475 --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,24 @@ +name: Spell Check + +on: + pull_request: + push: + schedule: + # Run every Saturday at 3 AM UTC to catch new misspelling detections resulting from dictionary updates. + - cron: "0 3 * * 6" + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch + workflow_dispatch: + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch + repository_dispatch: + +jobs: + spellcheck: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md + - name: Spell check + uses: codespell-project/actions-codespell@master diff --git a/README.adoc b/README.adoc index 5972f0f..182880a 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,12 @@ -= ArduinoECCX08 = +// Define the repository information in these attributes +:repository-owner: arduino-libraries +:repository-name: ArduinoECCX08 + += {repository-name} = + +image:https://github.com/{repository-owner}/{repository-name}/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Compile+Examples"] +image:https://github.com/{repository-owner}/{repository-name}/workflows/Arduino%20Lint/badge.svg["Arduino Lint Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Arduino+Lint"] +image:https://github.com/{repository-owner}/{repository-name}/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Spell+Check"] Arduino Library for the Atmel/Microchip ECC508 and ECC608 crypto chips