Skip to content

Commit 5491733

Browse files
authored
Add GitHub Actions workflow for automated compilation testing
- Add GitHub Actions workflow in .github/workflows/compile-test.yml. - Configure Arduino CLI to use Earle Philhower's RP2040 core. - Automatically compile all .ino examples on every push and pull request. - Ensure library integrity against the RP2040:rpipico board architecture.
1 parent 11c1184 commit 5491733

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/compile-test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Compile Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout Code
11+
uses: actions/checkout@v3
12+
13+
- name: Install Arduino CLI
14+
run: |
15+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
16+
echo "$HOME/bin" >> $GITHUB_PATH
17+
18+
- name: Setup RP2040 Core
19+
run: |
20+
arduino-cli core update-index
21+
arduino-cli core update-index --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
22+
arduino-cli core install rp2040:rp2040 --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
23+
24+
- name: Link Library
25+
run: |
26+
mkdir -p $HOME/Arduino/libraries
27+
ln -s $GITHUB_WORKSPACE $HOME/Arduino/libraries/PicoTimer
28+
29+
- name: Compile Examples
30+
run: |
31+
# This compiles every .ino file found in the examples folder
32+
for example in $(find ./examples -name "*.ino"); do
33+
echo "Compiling $example..."
34+
arduino-cli compile --fqbn rp2040:rp2040:rpipico $example
35+
done

0 commit comments

Comments
 (0)