|
13 | 13 | - name: Checkout repository |
14 | 14 | uses: actions/checkout@v2 |
15 | 15 |
|
| 16 | + - name: Checkout ArduinoCore-API |
| 17 | + uses: actions/checkout@v2 |
| 18 | + with: |
| 19 | + repository: arduino/ArduinoCore-API |
| 20 | + path: extras/ArduinoCore-API |
| 21 | + |
| 22 | + - name: Check if API should be compiled in the core |
| 23 | + id: checkapi |
| 24 | + run: | |
| 25 | + if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi |
| 26 | +
|
| 27 | + - name: Checkout latest tag of ArduinoCore-API and add it to the core |
| 28 | + run: | |
| 29 | + cd extras/ArduinoCore-API |
| 30 | + git fetch --tags |
| 31 | + git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) |
| 32 | + cd ../.. |
| 33 | + mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino" |
| 34 | + if: steps.checkapi.outputs.IS_API == 'true' |
| 35 | + |
| 36 | + - name: Remove ArduinoCore-API |
| 37 | + run: rm -r "$GITHUB_WORKSPACE/extras/ArduinoCore-API" |
| 38 | + |
16 | 39 | - name: Set env |
17 | 40 | run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
18 | 41 |
|
|
52 | 75 | with: |
53 | 76 | version: "0.14.0" |
54 | 77 |
|
55 | | - - name: Download new core |
| 78 | + - name: Download and verify new core |
56 | 79 | run: | |
57 | 80 | export PATH=$PATH:$PWD |
58 | 81 | arduino-cli version |
|
63 | 86 | arduino-cli config dump -v |
64 | 87 | arduino-cli core update-index -v |
65 | 88 | arduino-cli core install arduino:${ARCHITECTURE}@${TAG_VERSION} |
66 | | -
|
67 | | - - name: Checkout ArduinoCore-API |
68 | | - uses: actions/checkout@v2 |
69 | | - with: |
70 | | - repository: arduino/ArduinoCore-API |
71 | | - path: extras/ArduinoCore-API |
72 | | - |
73 | | - - name: Check if API should be compiled in the core |
74 | | - id: checkapi |
75 | | - run: | |
76 | | - if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi |
77 | | -
|
78 | | - - name: Integrate ArduinoCore-API |
79 | | - run: mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/packages/arduino/hardware/${ARCHITECTURE}/${TAG_VERSION}/cores/arduino" |
80 | | - if: steps.checkapi.outputs.IS_API == 'true' |
81 | | - |
82 | | - - name: Verify new core |
83 | | - run: | |
84 | 89 | INDEX=0 |
85 | 90 | arduino-cli board listall --format=json > boardlist.json |
86 | 91 | N=$(jq '.boards | length' boardlist.json) |
|
0 commit comments