forked from espressif/arduino-esp32
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (74 loc) · 2.33 KB
/
allboards.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
name: Boards Test - Remote trigger
# The workflow will run on remote dispath with event-type set to "test-boards"
on:
repository_dispatch:
types: [test-boards]
jobs:
find-boards:
runs-on: ubuntu-latest
outputs:
fqbns: ${{ env.FQBNS }}
board-count: ${{ env.BOARD-COUNT }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}
- name: Get boards fqbns
run:
bash .github/scripts/find_all_boards.sh
setup-chunks:
needs: find-boards
runs-on: ubuntu-latest
if: needs.find-boards.outputs.fqbns != ''
outputs:
test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}
- run: npm install
- name: Setup jq
uses: dcarbone/[email protected]
- id: set-test-chunks
name: Set Chunks
run:
echo "test-chunks<<EOF" >> $GITHUB_OUTPUT
echo "$( jq -nc '${{ needs.find-boards.outputs.fqbns }} | [_nwise( ${{ needs.find-boards.outputs.board-count }}/15 | ceil)]')" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
test-boards:
needs: setup-chunks
runs-on: ubuntu-latest
env:
REPOSITORY: |
- source-path: '.'
name: "espressif:esp32"
strategy:
fail-fast: false
matrix:
chunk: ${{ fromJSON(needs.setup-chunks.outputs['test-chunks']) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}
- name: Echo FQBNS to file
run:
echo "$FQBN" > fqbns.json
env:
FQBN: ${{ toJSON(matrix.chunk) }}
- name: Compile sketch
uses: P-R-O-C-H-Y/compile-sketches@main
with:
platforms: |
${{ env.REPOSITORY }}
multiple-fqbn: true
multiple-fqbn-path: "fqbns.json"
use-json-file: false
enable-deltas-report: false
enable-warnings-report: false
cli-compile-flags: |
- --warnings="all"
sketch-paths:
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"