Add angular constraints functionality #221
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
env: | |
# It's convenient to set variables for values used multiple times in the workflow | |
SKETCHES_REPORTS_PATH: sketches-reports | |
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: arduino/arduino-lint-action@v1 | |
with: | |
library-manager: update | |
compliance: strict | |
recursive: true | |
project-type: library | |
formatting-check: | |
name: Formatting Check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
path: | |
- 'src' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run clang-format style check for C/C++/Protobuf programs. | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '13' | |
check-path: ${{ matrix.path }} | |
fallback-style: 'Google' # optional | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- run: | | |
gem install arduino_ci | |
arduino_ci.rb --skip-examples-compilation | |
compile: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
fqbn: | |
- "arduino:avr:uno" | |
- "arduino:avr:mega" | |
- "arduino:sam:arduino_due_x_dbg" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: arduino/compile-sketches@v1 | |
with: | |
fqbn: ${{ matrix.fqbn }} | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
sketch-paths: | | |
- ./examples/example_2DOFMoveUpAndDown/example_2DOFMoveUpAndDown.ino | |
- ./examples/example_3DOFGrippingOffset/example_3DOFGrippingOffset.ino | |
- ./examples/example_2DOFMoveCircle/example_2DOFMoveCircle.ino | |
- ./examples/example_3DOFToolAngle/example_3DOFToolAngle.ino | |
- ./examples/example_3DOFToolAngle/example_3DOFToolAngle.ino | |
- ./examples/example_4DOF/example_4DOF.ino | |
# This step is needed to pass the size data to the report job | |
- name: Upload sketches report to workflow artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report | |
report: | |
needs: compile # 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@v3 | |
with: | |
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- uses: arduino/report-size-deltas@v1 | |
with: | |
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} |