|
9 | 9 | - '**.md'
|
10 | 10 | workflow_dispatch:
|
11 | 11 |
|
12 |
| -jobos: |
| 12 | +env: |
| 13 | + # It's convenient to set variables for values used multiple times in the workflow |
| 14 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 15 | + SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports |
| 16 | + |
| 17 | +jobs: |
13 | 18 | compile-sketches:
|
14 |
| - runs-on: ubuntu-latest |
15 |
| - steps: |
16 |
| - - uses: actions/checkout@v3 |
17 |
| - - uses: arduino/compile-sketches@v1 |
18 |
| - with: |
19 |
| - # 要修正 |
20 |
| - fqbn: arduino:avr:uno |
21 |
| - sketch-paths: | |
22 |
| - - uROS_STEP1_LED |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v3 |
| 22 | + - uses: arduino/compile-sketches@v1 |
| 23 | + with: |
| 24 | + enable-deltas-report: true |
| 25 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 26 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + fqbn: esp32:esp32:esp32s3 |
| 28 | + platforms: | # ESP32公式のpackage indexを使用する |
| 29 | + - name: esp32:esp32 |
| 30 | + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json |
| 31 | + libraries: | # RTがカスタマイズしたmicro_ros_arduinoライブラリを使用する |
| 32 | + - source-url: https://github.com/ShotaAk/micro_ros_arduino/archive/refs/tags/humble-add-custom-msg-esp32s3.zip |
| 33 | + cli-compile-flags: | # 警告がエラーとして扱われるので、対処しない警告はエラーから除外する |
| 34 | + - --build-property |
| 35 | + - "compiler.cpp.extra_flags= \ |
| 36 | + -Wno-error=unused-but-set-parameter \ |
| 37 | + -Wno-error=unused-but-set-variable \ |
| 38 | + -Wno-error=unused-variable \ |
| 39 | + -Wno-error=switch \ |
| 40 | + -Wno-error=char-subscripts \ |
| 41 | + -Wno-error=return-type \ |
| 42 | + -Wno-error=type-limits \ |
| 43 | + -Wno-error=ignored-qualifiers \ |
| 44 | + -Wno-error=implicit-function-declaration" |
| 45 | + sketch-paths: | |
| 46 | + - uROS_STEP1_LED |
| 47 | + - uROS_STEP2_SWITCH |
| 48 | + - uROS_STEP3_Buzzer |
| 49 | + - uROS_STEP4_Sensor |
| 50 | + - uROS_STEP5_Straight |
| 51 | + - uROS_STEP6_rotate |
| 52 | + - uROS_STEP7_P_control |
| 53 | + - uROS_STEP8_micromouse |
| 54 | + - uROS_STEP10_twistMsg |
| 55 | + - uROS_STEP11_tfMsg |
| 56 | + - uROS_STEP12_SensorMsg |
| 57 | + - uROS_STEP13_micromouse |
| 58 | +
|
| 59 | + # This step is needed to pass the size data to the report job |
| 60 | + - name: Upload sketches report to workflow artifact |
| 61 | + uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} |
| 64 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 65 | + |
| 66 | + report: |
| 67 | + needs: compile-sketches # Wait for the compile job to finish to get the data for the report |
| 68 | + if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request |
| 69 | + runs-on: ubuntu-latest |
| 70 | + steps: |
| 71 | + # This step is needed to get the size data produced by the compile jobs |
| 72 | + - name: Download sketches reports artifact |
| 73 | + uses: actions/download-artifact@v3 |
| 74 | + with: |
| 75 | + name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} |
| 76 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 77 | + |
| 78 | + - uses: arduino/report-size-deltas@v1 |
| 79 | + with: |
| 80 | + sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} |
| 81 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments