Skip to content

Commit 1b7727c

Browse files
committed
create build.yml for CI CD
This creates a CI CD build workflow to check if project builds successfully for a basic fade led and i2c samples Signed-off-by: Dhruva Gole <[email protected]>
1 parent 6fabfbd commit 1b7727c

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
container: zephyrprojectrtos/ci:latest
9+
env:
10+
CMAKE_PREFIX_PATH: /opt/toolchains
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
path: Arduino-Zephyr-API
16+
17+
- name: Initialize
18+
working-directory: Arduino-Zephyr-API
19+
run: |
20+
west init -m https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core.git
21+
west update
22+
git clone https://github.com/arduino/ArduinoCore-API.git ArduinoCore-API
23+
sed '/WCharacter.h/ s/./\/\/ &/' ArduinoCore-API/api/ArduinoAPI.h > ArduinoCore-API/api/tmpArduinoAPI.h
24+
mv ArduinoCore-API/api/tmpArduinoAPI.h ArduinoCore-API/api/ArduinoAPI.h
25+
cp -r ArduinoCore-API/api modules/lib/Arduino-Zephyr-API/cores/arduino/.
26+
27+
- name: Build fade
28+
working-directory: Arduino-Zephyr-API
29+
run: |
30+
west build -p -b arduino_nano_33_ble_sense samples/fade
31+
32+
- name: Build i2cdemo
33+
working-directory: Arduino-Zephyr-API
34+
run: |
35+
west build -p -b arduino_nano_33_ble_sense samples/i2cdemo
36+
37+
- name: Archive firmware
38+
uses: actions/upload-artifact@v2
39+
with:
40+
name: firmware
41+
path: Arduino-Zephyr-API/build/zephyr/zephyr.*

0 commit comments

Comments
 (0)