diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..ad2cf32 --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,76 @@ +name: Compile Examples + +on: + pull_request: + paths: + - .github/workflows/compile-examples.yml + - examples/** + - src/** + push: + paths: + - .github/workflows/compile-examples.yml + - examples/** + - src/** + +jobs: + build: + runs-on: ubuntu-latest + + env: + # libraries to install for all boards + UNIVERSAL_LIBRARIES: | + # install the ArduinoBearSSL library from the local path + - source-path: ./ + - name: ArduinoECCX08 + # sketch paths to compile (recursive) for all boards + UNIVERSAL_SKETCH_PATHS: '"examples/SHA1" "examples/SHA256"' + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:samd:mkr1000 + type: wifi101 + - fqbn: arduino:samd:mkrgsm1400 + type: gsm + - fqbn: arduino:megaavr:uno2018 + type: megaavr + + # make board type-specific customizations to the matrix jobs + include: + # WiFi101-compatible boards + - board: + type: wifi101 + libraries: | + - name: WiFi101 + sketch-paths: '"examples/WiFiSSLClient"' + # GSM boards + - board: + type: gsm + libraries: | + - name: MKRGSM + sketch-paths: '"examples/MKRGSMSSLClient"' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Compile examples + uses: per1234/actions/libraries/compile-examples@beaac5ae4bb7ab294f1305e436172fde4c281fc8 + with: + fqbn: ${{ matrix.board.fqbn }} + libraries: | + ${{ env.UNIVERSAL_LIBRARIES }} + ${{ matrix.libraries }} + sketch-paths: ${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.sketch-paths }} + size-report-sketch: SHA256 + enable-size-deltas-report: true + verbose: true + + - name: Save sketches report as artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v2 + with: + name: size-deltas-reports + path: size-deltas-reports diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml new file mode 100644 index 0000000..fb75d80 --- /dev/null +++ b/.github/workflows/report-size-deltas.yml @@ -0,0 +1,14 @@ +name: Report Size Deltas + +on: + schedule: + # schedule action for every five minutes (ends up being a little longer in practice) + - cron: "*/5 * * * *" + +jobs: + report: + runs-on: ubuntu-latest + + steps: + - name: Comment size deltas reports to PRs + uses: arduino/actions/libraries/report-size-deltas@master diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 0000000..fba93da --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,17 @@ +name: Spell Check + +on: [push, pull_request] + +jobs: + spellcheck: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Spell check + uses: arduino/actions/libraries/spell-check@master + with: + ignore-words-list: extras/codespell-ignore-words-list.txt + skip-paths: ./extras/TrustAnchors,./src/bearssl diff --git a/extras/codespell-ignore-words-list.txt b/extras/codespell-ignore-words-list.txt new file mode 100644 index 0000000..e69de29