diff --git a/.github/workflows/arduino_lint.yml b/.github/workflows/arduino_lint.yml new file mode 100644 index 000000000..649ba0a83 --- /dev/null +++ b/.github/workflows/arduino_lint.yml @@ -0,0 +1,18 @@ +name: Arduino Lint +on: + push: + pull_request: + # Allow manual trigger + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: arduino/arduino-lint-action@v1 + with: + project-type: library + library-manager: update + compliance: specification diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index be5acaa8b..9708bbf5f 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -4,14 +4,14 @@ name: Compile Examples on: push: paths: - - ".github/workflows/compile_examples.yml" + - ".github/workflows/**" - "examples/**" - "**.cpp" - "**.h" - "**.hpp" pull_request: paths: - - ".github/workflows/compile_examples.yml" + - ".github/workflows/**" - "examples/**" - "**.cpp" - "**.h" @@ -69,4 +69,21 @@ jobs: with: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-reports-artifact + + # When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report + report: + needs: build # Wait for the compile job to finish to get the data for the report + if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request + runs-on: ubuntu-latest + steps: + # This step is needed to get the size data produced by the compile jobs + - name: Download sketches reports artifact + uses: actions/download-artifact@v2 + with: + name: sketches-reports-artifact + path: ${{ env.SKETCHES_REPORTS_PATH }} + + - uses: arduino/report-size-deltas@v1 + with: + sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}