|
13 | 13 | - name: Checkout repository
|
14 | 14 | uses: actions/checkout@v2
|
15 | 15 |
|
| 16 | + - name: Get Latest Release |
| 17 | + id: latest_API_version |
| 18 | + |
| 19 | + with: |
| 20 | + owner: arduino |
| 21 | + repo: ArduinoCore-API |
| 22 | + |
| 23 | + - name: Set ArduinoCore-API latest version as env variable |
| 24 | + run: | |
| 25 | + echo "LATEST_TAG_API=$(echo ${{ steps.latest_API_version.outputs.latest_tag }})" >> $GITHUB_ENV |
| 26 | +
|
| 27 | + - name: Checkout ArduinoCore-API |
| 28 | + uses: actions/checkout@v2 |
| 29 | + with: |
| 30 | + repository: arduino/ArduinoCore-API |
| 31 | + ref: ${{ env.LATEST_TAG_API }} |
| 32 | + path: extras/ArduinoCore-API |
| 33 | + |
| 34 | + - name: Check if API should be compiled in the core |
| 35 | + id: checkapi |
| 36 | + run: | |
| 37 | + if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi |
| 38 | +
|
| 39 | + - name: Integrate ArduinoCore-API |
| 40 | + run: mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino" |
| 41 | + if: steps.checkapi.outputs.IS_API == 'true' |
| 42 | + |
| 43 | + - name: Remove ArduinoCore-API |
| 44 | + run: rm -r "$GITHUB_WORKSPACE/extras/ArduinoCore-API" |
| 45 | + |
16 | 46 | - name: Set env
|
17 | 47 | run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
18 | 48 |
|
|
52 | 82 | with:
|
53 | 83 | version: "0.14.0"
|
54 | 84 |
|
55 |
| - - name: Download new core |
| 85 | + - name: Download and verify new core |
56 | 86 | run: |
|
57 | 87 | export PATH=$PATH:$PWD
|
58 | 88 | arduino-cli version
|
|
63 | 93 | arduino-cli config dump -v
|
64 | 94 | arduino-cli core update-index -v
|
65 | 95 | 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 | 96 | INDEX=0
|
85 | 97 | arduino-cli board listall --format=json > boardlist.json
|
86 | 98 | N=$(jq '.boards | length' boardlist.json)
|
|
0 commit comments