Skip to content

Commit f5680a6

Browse files
committed
get cli version from arduino-app-cli
1 parent b542ab9 commit f5680a6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/check-sketches-deps.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,25 @@ jobs:
88
compile-sketches:
99
runs-on: ubuntu-latest
1010
steps:
11+
# Checkout arduino-app-cli to extract the version from go.mod file dynamically.
12+
# This ensures that the same version of arduino-cli is used as a dependency.
13+
- name: Checkout arduino-app-cli repository
14+
uses: actions/checkout@v4
15+
with:
16+
repository: arduino/arduino-app-cli
17+
18+
- name: Extract cli-version from go.mod
19+
id: get_cli_version
20+
run: |
21+
CLI_VERSION=$(grep 'github.com/arduino/arduino-cli ' go.mod | awk '{print $2}' | sed 's/^v//')
22+
echo "cli_version=$CLI_VERSION" >> $GITHUB_OUTPUT
23+
1124
- name: Checkout repository
1225
uses: actions/checkout@v4
1326

1427
- name: Verify sketches
1528
uses: arduino/compile-sketches@v1
1629
with:
30+
cli-version: ${{ steps.get_cli_version.outputs.cli_version }}
1731
fqbn: "arduino:zephyr:unoq"
1832
sketch-paths: "./examples"

0 commit comments

Comments
 (0)