-
-
Notifications
You must be signed in to change notification settings - Fork 281
309 lines (289 loc) · 12.4 KB
/
main.yml
File metadata and controls
309 lines (289 loc) · 12.4 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# This is the name of the workflow, visible on GitHub UI.
name: TaskScheduler Examples Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request only for the main branch
push:
branches: [ master, main ]
paths:
- 'examples/**'
- 'src/**'
- 'tests/**'
pull_request:
branches: [ master, main ]
paths:
- 'examples/**'
- 'src/**'
- 'tests/**'
workflow_dispatch:
# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This is the name of the job - can be whatever.
ArduinoIDE_AVR:
# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
strategy:
matrix:
# The matrix will produce one job for each configuration
# parameter of type `arduino-platform`, in this case, it
# is only 1.
arduino-platform: ["arduino:avr"]
# This is usually optional but we need to statically define the
# FQBN of the boards we want to test for each platform. In the
# future the CLI might automatically detect and download the
# core needed to compile against a certain FQBN, at that point
# the following `include` section will be useless.
fqbn: ["arduino:avr:uno"]
example:
- "Scheduler_example00_Blink"
- "Scheduler_example00_Blink_Namespace"
- "Scheduler_example01"
- "Scheduler_example02"
- "Scheduler_example03"
- "Scheduler_example04_StatusRequest"
- "Scheduler_example05_StatusRequest"
- "Scheduler_example06_IDLE"
- "Scheduler_example07_WDT"
- "Scheduler_example08_LTS"
- "Scheduler_example09_TimeCritical"
- "Scheduler_example10_Benchmark"
- "Scheduler_example11_Priority"
- "Scheduler_example12_Priority"
- "Scheduler_example13_Micros"
- "Scheduler_example16_Multitab"
- "Scheduler_example17_Timeout"
- "Scheduler_example18_StatusRequest_LTS_WDT_Timeout"
- "Scheduler_example19_Dynamic_Tasks"
- "Scheduler_example19_Dynamic_Tasks_SelfDestruct"
- "Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object"
- "Scheduler_example21_OO_Callbacks"
- "Scheduler_example23_IDLE_Callback"
- "Scheduler_example24_CPU_LOAD"
- "Scheduler_example25_SCHEDULER_CHAIN"
- "Scheduler_example26_SCHEDULING_OPTIONS"
- "Scheduler_example28_Tickless"
# This is the platform GitHub will use to run our workflow,
# I picked ubuntu.
runs-on: ubuntu-latest
# This is the list of steps this job will run.
steps:
# First of all, we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@main
# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
# We then install the platform, which one will be determined
# dynamically by the build matrix.
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.arduino-platform }}
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Install required libraries
run: |
mkdir -p "$HOME/Arduino/libraries"
# Install QueueArray from Arduino Playground
wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip
unzip queuearray.zip -d "$HOME/Arduino/libraries/"
# Install MemoryFree library from Arduino Library Manager
git clone https://github.com/McNeight/MemoryFree.git
cp -r MemoryFree "$HOME/Arduino/libraries/"
# Finally, we compile the sketch, using the FQBN that was set
# in the build matrix.
- name: Compile ${{ matrix.example }}
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more
ArduinoIDE_ESP32:
strategy:
matrix:
arduino-platform: ["esp32:esp32"]
fqbn: ["esp32:esp32:esp32"]
example:
- "Scheduler_example00_Blink"
- "Scheduler_example00_Blink_Namespace"
- "Scheduler_example01"
- "Scheduler_example02"
- "Scheduler_example03"
- "Scheduler_example04_StatusRequest"
- "Scheduler_example05_StatusRequest"
- "Scheduler_example06_IDLE"
- "Scheduler_example08_LTS"
- "Scheduler_example09_TimeCritical"
- "Scheduler_example10_Benchmark"
- "Scheduler_example11_Priority"
- "Scheduler_example12_Priority"
- "Scheduler_example13_Micros"
- "Scheduler_example15_STDFunction"
- "Scheduler_example16_Multitab"
- "Scheduler_example17_Timeout"
- "Scheduler_example18_StatusRequest_LTS_WDT_Timeout"
- "Scheduler_example19_Dynamic_Tasks"
- "Scheduler_example19_Dynamic_Tasks_SelfDestruct"
- "Scheduler_example19_Dynamic_Tasks_stdQueue"
- "Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object"
- "Scheduler_example21_OO_Callbacks"
- "Scheduler_example23_IDLE_Callback"
- "Scheduler_example24_CPU_LOAD"
- "Scheduler_example25_SCHEDULER_CHAIN"
- "Scheduler_example26_SCHEDULING_OPTIONS"
- "Scheduler_example28_Tickless"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.arduino-platform }}
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Install required libraries
run: |
mkdir -p "$HOME/Arduino/libraries"
# Install QueueArray from Arduino Playground
wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip
unzip queuearray.zip -d "$HOME/Arduino/libraries/"
# Install MemoryFree library from Arduino Library Manager
git clone https://github.com/McNeight/MemoryFree.git
cp -r MemoryFree "$HOME/Arduino/libraries/"
- name: Compile ${{ matrix.example }}
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more
ArduinoIDE_ESP8266_ONLY:
strategy:
matrix:
arduino-platform: ["esp8266:esp8266"]
fqbn: ["esp8266:esp8266:nodemcuv2"]
example:
- "Scheduler_example14_Yield"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
- name: Install platform
run: |
arduino-cli core update-index --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli core install ${{ matrix.arduino-platform }} --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Compile ${{ matrix.example }}
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more
ArduinoIDE_STM32:
strategy:
matrix:
arduino-platform: ["STMicroelectronics:stm32"]
fqbn: ["STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F401RE"]
example:
- "Scheduler_example00_Blink"
- "Scheduler_example00_Blink_Namespace"
- "Scheduler_example01"
- "Scheduler_example02"
- "Scheduler_example03"
- "Scheduler_example04_StatusRequest"
- "Scheduler_example05_StatusRequest"
- "Scheduler_example06_IDLE"
- "Scheduler_example08_LTS"
- "Scheduler_example09_TimeCritical"
- "Scheduler_example10_Benchmark"
- "Scheduler_example11_Priority"
- "Scheduler_example12_Priority"
- "Scheduler_example13_Micros"
- "Scheduler_example15_STDFunction"
- "Scheduler_example16_Multitab"
- "Scheduler_example17_Timeout"
- "Scheduler_example18_StatusRequest_LTS_WDT_Timeout"
- "Scheduler_example19_Dynamic_Tasks"
- "Scheduler_example19_Dynamic_Tasks_SelfDestruct"
- "Scheduler_example19_Dynamic_Tasks_stdQueue"
- "Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object"
- "Scheduler_example21_OO_Callbacks"
- "Scheduler_example23_IDLE_Callback"
- "Scheduler_example24_CPU_LOAD"
- "Scheduler_example25_SCHEDULER_CHAIN"
- "Scheduler_example26_SCHEDULING_OPTIONS"
- "Scheduler_example28_Tickless"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
- name: Install platform
run: |
arduino-cli core update-index --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
arduino-cli core install ${{ matrix.arduino-platform }} --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Install required libraries
run: |
mkdir -p "$HOME/Arduino/libraries"
# Install QueueArray from Arduino Playground
wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip
unzip queuearray.zip -d "$HOME/Arduino/libraries/"
# Install MemoryFree library from GitHub
git clone https://github.com/McNeight/MemoryFree.git
cp -r MemoryFree "$HOME/Arduino/libraries/"
- name: Compile ${{ matrix.example }}
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more
PIO:
strategy:
matrix:
example:
- "Scheduler_example27_PlatformIO"
- "Scheduler_example29_NonArduino"
- "Scheduler_example30_THREAD_SAFE"
environment:
- "esp32dev"
include:
- example: "Scheduler_example27_PlatformIO"
environment: "esp32dev"
- example: "Scheduler_example29_NonArduino"
environment: "esp32dev"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Setup libraries for PlatformIO
run: |
cd examples/${{ matrix.example }}
# Remove any existing lib_deps from platformio.ini that reference TaskScheduler
sed -i '/arkhipenko\/TaskScheduler/d' platformio.ini || true
sed -i '/TaskScheduler/d' platformio.ini || true
# Clone the current branch/commit to get TaskScheduler source
mkdir -p lib
git clone --depth 1 --branch ${GITHUB_REF#refs/heads/} https://github.com/${GITHUB_REPOSITORY}.git lib/TaskScheduler
# Install other required libraries
wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip
unzip queuearray.zip -d lib/
git clone https://github.com/McNeight/MemoryFree.git
cp -r MemoryFree lib/
# Verify library installation
ls -la lib/
- name: Compile ${{ matrix.example }}
run: |
cd examples/${{ matrix.example }}
pio run -e ${{ matrix.environment }}