-
Notifications
You must be signed in to change notification settings - Fork 53
146 lines (137 loc) · 6.94 KB
/
CI_compile_examples.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: CI Compile Examples
on:
pull_request:
paths:
- ".github/workflows/CI_compile_examples.yml"
- "Arduino_package/hardware/libraries/**"
- "Arduino_package/hardware/cores/**"
- "Arduino_package/hardware/variants/**"
push:
paths:
- ".github/workflows/CI_compile_examples.yml"
- "Arduino_package/hardware/libraries/**"
- "Arduino_package/hardware/cores/**"
- "Arduino_package/hardware/variants/**"
# workflow_dispatch event allows the workflow to be triggered manually
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# repository_dispatch event allows the workflow to be triggered via the GitHub API
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:
# weekly, Monday, 12 00 AM
schedule:
- cron: '0 12 * * 1'
jobs:
compile-examples_ubuntu:
name: ubuntu-latest - ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest
# list of all examples
env:
examples-to-use: |
- Arduino_package/hardware/libraries/Analog
- Arduino_package/hardware/libraries/AudioCodec
- Arduino_package/hardware/libraries/BLE
- Arduino_package/hardware/libraries/Debugging
- Arduino_package/hardware/libraries/FatfsSDIO
- Arduino_package/hardware/libraries/FlashMemory
- Arduino_package/hardware/libraries/GPIO
- Arduino_package/hardware/libraries/GTimer
- Arduino_package/hardware/libraries/Http
- Arduino_package/hardware/libraries/IRDevice
- Arduino_package/hardware/libraries/MDNS
- Arduino_package/hardware/libraries/MQTTClient
- Arduino_package/hardware/libraries/NTPClient
- Arduino_package/hardware/libraries/OTA
- Arduino_package/hardware/libraries/PowerSave
#- Arduino_package/hardware/libraries/Preferences
- Arduino_package/hardware/libraries/RTC
- Arduino_package/hardware/libraries/SoftwareSerial
- Arduino_package/hardware/libraries/SPI
- Arduino_package/hardware/libraries/Sys
- Arduino_package/hardware/libraries/USB
- Arduino_package/hardware/libraries/Watchdog
- Arduino_package/hardware/libraries/WiFi/examples/ConcurrentMode
- Arduino_package/hardware/libraries/WiFi/examples/ConnectWithWiFi
- Arduino_package/hardware/libraries/WiFi/examples/HTTP_IFTTT_Post
- Arduino_package/hardware/libraries/WiFi/examples/IPv6TCPClient
- Arduino_package/hardware/libraries/WiFi/examples/IPv6TCPServer
- Arduino_package/hardware/libraries/WiFi/examples/IPv6UDPClient
- Arduino_package/hardware/libraries/WiFi/examples/IPv6UDPServer
- Arduino_package/hardware/libraries/WiFi/examples/ScanNetworks
- Arduino_package/hardware/libraries/WiFi/examples/ScanNetworksAdvanced
- Arduino_package/hardware/libraries/WiFi/examples/SimpleServerWiFi
- Arduino_package/hardware/libraries/WiFi/examples/SimpleWebServerWiFi
- Arduino_package/hardware/libraries/WiFi/examples/UDP_Calculation
- Arduino_package/hardware/libraries/WiFi/examples/WiFiAPMode
#- Arduino_package/hardware/libraries/WiFi/examples/WiFiControlCar
- Arduino_package/hardware/libraries/WiFi/examples/WiFiSSLClient
- Arduino_package/hardware/libraries/WiFi/examples/WiFiUdpNtpClient
- Arduino_package/hardware/libraries/WiFi/examples/WiFiUdpSendReceiveString
- Arduino_package/hardware/libraries/WiFi/examples/WiFiWebClient
- Arduino_package/hardware/libraries/WiFi/examples/WiFiWebServer
- Arduino_package/hardware/libraries/Wire
- Arduino_package/hardware/libraries/WS2812B
strategy:
fail-fast: false
matrix:
board:
- fqbn: Ameba_AMB21_AMB22
- fqbn: Ameba_AMB23
- fqbn: Ai-Thinker_BW16
- fqbn: SparkFun_ThingPlus-AWCU488
- fqbn: Ameba_AMB25
- fqbn: Ameba_AMB26
- fqbn: u-blox_NORA-W30
- fqbn: Sparkfun_ThingPlus-NORA-W306
steps:
- name: Exit workflow (other branches)
run: exit 1
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev' && github.event.pull_request.base.ref != 'dev' && github.event.pull_request.base.ref != 'master'}}
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: |
Arduino_package
Arduino_zip_libraries
- name: Compile examples dev
uses: arduino/[email protected]
with:
fqbn: realtek:AmebaD:${{ matrix.board.fqbn }}
sketch-paths: |
${{ env['examples-to-use'] }}
platforms: |
# Install ambd_arduino via Boards Manager for the toolchain
- source-url: https://github.com/ambiot/ambd_arduino/raw/dev/Arduino_package/package_realtek_amebad_early_index.json
name: realtek:AmebaD
# Overwrite the ambd_arduino release version with the platform from the local path
- source-path: Arduino_package/hardware/
name: realtek:AmebaD
libraries: |
# The sketches typically don't have any external library dependencies, just some:
- source-url: https://github.com/ambiot/ambd_arduino/raw/dev/Arduino_zip_libraries/AmebaMotors.zip
- source-url: https://github.com/ambiot/ambd_arduino/raw/dev/Arduino_zip_libraries/AmebaEink.zip
- name: "SparkFun ADXL313 Arduino Library"
verbose: false
enable-deltas-report: false
if: ${{ github.ref == 'refs/heads/dev' || github.event.pull_request.base.ref == 'dev'}}
- name: Compile examples master
uses: arduino/[email protected]
with:
fqbn: realtek:AmebaD:${{ matrix.board.fqbn }}
sketch-paths: |
${{ env['examples-to-use'] }}
platforms: |
# Install ambd_arduino via Boards Manager for the toolchain
- source-url: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek_amebad_index.json
name: realtek:AmebaD
# Overwrite the ambd_arduino release version with the platform from the local path
- source-path: Arduino_package/hardware/
name: realtek:AmebaD
libraries: |
# The sketches typically don't have any external library dependencies, just some:
- source-url: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_zip_libraries/AmebaMotors.zip
- source-url: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_zip_libraries/AmebaEink.zip
- name: "SparkFun ADXL313 Arduino Library"
verbose: false
enable-deltas-report: false
if: ${{ github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master' }}