Skip to content

Commit ab71327

Browse files
committed
Create test-compilation.yml
1 parent 3c3f8fa commit ab71327

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Link to Introduction to Arduino Actions:
2+
# https://blog.arduino.cc/2021/04/09/test-your-arduino-projects-with-github-actions/
3+
name: test-compilation
4+
5+
on:
6+
workflow_dispatch:
7+
branches:
8+
#- push
9+
#- pull_request
10+
11+
env:
12+
CORE_VERSION: 3.0.7
13+
14+
jobs:
15+
compile-sketch:
16+
17+
name: Compile sketch
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@main
23+
24+
- name: Branch name
25+
run: echo running on branch ${{github.ref_name}}
26+
27+
- name: Setup Arduino CLI
28+
uses: arduino/setup-arduino-cli@v1
29+
30+
- name: Start config file
31+
run: arduino-cli config init --additional-urls "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json"
32+
33+
- name: Update core index
34+
run: arduino-cli core update-index
35+
36+
- name: Update library index
37+
run: arduino-cli lib update-index
38+
39+
- name: Install platform
40+
run: arduino-cli core install esp32:esp32@${{ env.CORE_VERSION }}
41+
42+
- name: Get IDF version
43+
run: |
44+
cd /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs
45+
IDF_VERSION=$(ls | grep idf-release)
46+
echo "ESP_IDF=${IDF_VERSION}" >> "$GITHUB_ENV"
47+
48+
- name: Get Known Libraries
49+
run: arduino-cli lib install
50+
"SparkFun u-blox GNSS v3"@main
51+
"SparkFun Authentication Coprocessor Arduino Library"@main
52+
"SparkFun Toolkit"@main
53+
54+
- name: Patch libbt
55+
run: |
56+
cd examples/ESP32_BluetoothSerial/patch/
57+
cp libbt.a /home/runner/.arduino15/packages/esp32/tools/esp32-arduino-libs/${{ env.ESP_IDF }}/esp32/lib/libbt.a
58+
59+
- name: Compile Sketch
60+
run: arduino-cli compile -v --library . --warnings all --fqbn "esp32:esp32:esp32" ./examples/ESP32_BluetoothSerial/ESP32_BluetoothSerial.ino
61+

0 commit comments

Comments
 (0)