-
-
Notifications
You must be signed in to change notification settings - Fork 15
126 lines (117 loc) · 3.75 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Build Examples
on:
push:
branches:
-master
pull_request:
workflow_dispatch:
jobs:
build_arduino:
strategy:
fail-fast: true
matrix:
example:
- "libraries/n-able/examples/FreeRTOS"
- "libraries/n-able/examples/BLE_Advertiser"
- "libraries/n-able/examples/BLE_Scan"
- "libraries/SPI/examples/BarometricPressureSensor"
- "libraries/Wire/examples/digital_potentiometer"
variant:
- Generic_nRF51822:chip=xxaa
- Generic_nRF52810
- Generic_nRF52832
- Generic_nRF52833
- Generic_nRF52840
- feather52840
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install utils
run: |
python -m pip install --upgrade pip
pip install adafruit-nrfutil
- name: Build n-able Arduino
uses: arduino/compile-sketches@v1
with:
cli-version: latest
platforms: |
- name: "h2zero:arm-ble"
source-url: "https://h2zero.github.io/n-able-Arduino/package_n-able_boards_index.json"
version: latest
- name: "h2zero:arm-ble"
source-path: .
libraries: |
- name: NimBLE-Arduino
fqbn: "h2zero:arm-ble:${{ matrix.variant }}"
sketch-paths: ${{ matrix.example }}
build_pio:
strategy:
fail-fast: false
matrix:
example:
- "example/lib/examples/Bluetooth_5/NimBLE_extended_server"
- "example/lib/examples/NimBLE_Server"
- "example/lib/examples/NimBLE_Client"
variant:
- generic_nrf51822_xxaa
- generic_nrf52810
- generic_nrf52832
- generic_nrf52833
- generic_nrf52840
- adafruit_feather_nrf52840
nimble_version:
- release/1.4
- master
include:
- example: "example/lib/examples/Bluetooth_5/NimBLE_extended_server"
flags: build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
- variant: adafruit_feather_nrf52840
bootloader: board_bootloader = adafruit
exclude:
- example: "example/lib/examples/Bluetooth_5/NimBLE_extended_server"
variant: generic_nrf51822_xxaa
- example: "example/lib/examples/Bluetooth_5/NimBLE_extended_server"
variant: generic_nrf52832
runs-on: ubuntu-latest
steps:
- name: Make build folders
run: |
mkdir -p example/framework
mkdir example/src
mkdir example/lib
- name: Checkout n-able-arduino
uses: actions/checkout@v4
with:
path: example/framework
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install platformio
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Checkout NimBLE_Arduino
uses: actions/checkout@v4
with:
repository: h2zero/NimBLE-Arduino
ref: ${{ matrix.nimble_version }}
path: example/lib
- name: Build n-able PIO
run: |
cat > example/platformio.ini << EOF
[env]
platform = https://github.com/h2zero/platform-n-able.git@^1.0.0
platform_packages = framework-n-able-arduino @ file://./framework
framework = arduino
${{ matrix.flags }}
${{ matrix.bootloader }}
[env:${{ matrix.variant }}]
board = ${{ matrix.variant }}
EOF
cp ${{ matrix.example }}/* example/src/
platformio run -d example