-
Notifications
You must be signed in to change notification settings - Fork 7.4k
89 lines (75 loc) · 2.56 KB
/
boards.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
name: Boards Test
# The workflow will run on schedule and labeled pull requests
on:
pull_request:
paths:
- 'boards.txt'
- 'libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino'
- '.github/workflows/boards.yml'
env:
# It's convenient to set variables for values used multiple times in the workflow
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
find-boards:
runs-on: ubuntu-latest
outputs:
fqbns: ${{ env.FQBNS }}
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup jq
uses: dcarbone/install-jq-action@v1.0.1
- name: Get board name
run:
bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.event.number}}
test-boards:
needs: find-boards
runs-on: ubuntu-latest
if: needs.find-boards.outputs.fqbns != ''
env:
REPOSITORY: |
- source-path: '.'
name: "espressif:esp32"
strategy:
matrix: ${{ fromJson(needs.find-boards.outputs.fqbns) }}
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v4
- name: Check if build.board is uppercase
run: |
board_name=$(echo ${{ matrix.fqbn }} | awk -F':' '{print $NF}')
if grep -q "^$board_name.build.board=[A-Z0-9_]*$" boards.txt; then
echo "$board_name.build.board is valid.";
else
echo "Error: $board_name.build.board is not uppercase!";
exit 1;
fi
- name: Get libs cache
uses: actions/cache@v4
with:
key: libs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package/package_esp32_index.template.json', 'tools/get.py') }}
path: |
./tools/dist
./tools/esp32-arduino-libs
./tools/esptool
./tools/mk*
./tools/openocd-esp32
./tools/riscv32-*
./tools/xtensa-*
- name: Compile sketch
uses: P-R-O-C-H-Y/compile-sketches@main
with:
platforms: |
${{ env.REPOSITORY }}
fqbn: ${{ matrix.fqbn }}
use-json-file: false
enable-deltas-report: false
enable-warnings-report: false
cli-compile-flags: |
- --warnings="all"
exit-on-fail: true
sketch-paths:
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
verbose: true