@@ -25,24 +25,29 @@ jobs:
25
25
- name : Prepare Sketches
26
26
id : prep-sketches
27
27
run : |
28
- SKETCHES=$(jq -c -n '{sketches: $ARGS.positional} ' --args `find tests -mindepth 1 -type d | cut -d"/" -f2`)
28
+ SKETCHES=$(jq -c -n '$ARGS.positional' --args `find tests -mindepth 1 -maxdepth 1 -type d | cut -d"/" -f2`)
29
29
echo "::set-output name=sketches::${SKETCHES}"
30
30
31
31
Build :
32
32
needs : prep_sketches
33
- name : Build ${{matrix.sketches}}
33
+ name : Build ${{matrix.sketches}} for ${{matrix.fqbn}}
34
34
runs-on : ubuntu-latest
35
35
strategy :
36
- matrix : ${{fromJson(needs.prep_sketches.outputs.sketches)}}
36
+ matrix :
37
+ fqbn : ['esp32:esp32:esp32', 'esp32:esp32:esp32s2', 'esp32:esp32:esp32c3']
38
+ sketches : ${{fromJson(needs.prep_sketches.outputs.sketches)}}
37
39
38
40
steps :
39
41
- name : Checkout Repository
40
42
uses : actions/checkout@v2
41
43
44
+ - name : Get target
45
+ run : echo "chip=$(echo ${{matrix.fqbn}} | cut -d":" -f3)" >> $GITHUB_ENV
46
+
42
47
- name : Build sketches
43
48
uses : arduino/compile-sketches@v1
44
49
with :
45
- fqbn : ' esp32:esp32:esp32 '
50
+ fqbn : ${{matrix.fqbn}}
46
51
platforms : |
47
52
- name: esp32:esp32
48
53
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
@@ -52,34 +57,42 @@ jobs:
52
57
sketch-paths : |
53
58
- tests/${{matrix.sketches}}
54
59
55
- - name : Upload ${{matrix.sketches}} artifacts
60
+ - name : Upload ${{matrix.sketches}}-${{env.chip}} artifacts
56
61
uses : actions/upload-artifact@v2
57
62
with :
58
- name : ${{matrix.sketches}}.artifacts
63
+ name : ${{matrix.sketches}}-${{env.chip}} .artifacts
59
64
path : |
60
65
tests/${{matrix.sketches}}/build/*.bin
61
66
tests/${{matrix.sketches}}/build/*.json
62
67
63
68
Test :
64
69
needs : [prep_sketches, Build]
65
- name : Test ${{matrix.sketches}}
70
+ name : Test ${{matrix.sketches}} for ${{matrix.fqbn}}
66
71
runs-on : ESP32
67
72
env :
68
73
PYTHON_VERSION : 3.10.1
69
74
PYENV_VERSION : v2.2.3
70
75
strategy :
71
- matrix : ${{fromJson(needs.prep_sketches.outputs.sketches)}}
76
+ matrix :
77
+ fqbn : ['esp32:esp32:esp32', 'esp32:esp32:esp32s2', 'esp32:esp32:esp32c3']
78
+ sketches : ${{fromJson(needs.prep_sketches.outputs.sketches)}}
72
79
73
80
steps :
74
81
- name : Checkout repository
75
82
uses : actions/checkout@v2
76
83
77
- - name : Download ${{matrix.sketches}} artifacts
84
+ - name : Get target
85
+ run : echo "chip=$(echo ${{matrix.fqbn}} | cut -d":" -f3)" >> $GITHUB_ENV
86
+
87
+ - name : Download ${{matrix.sketches}}-${{env.chip}} artifacts
78
88
uses : actions/download-artifact@v2
79
89
with :
80
- name : ${{matrix.sketches}}.artifacts
90
+ name : ${{matrix.sketches}}-${{env.chip}} .artifacts
81
91
path : tests/${{matrix.sketches}}/build
82
92
93
+ - name : Check chip
94
+ run : cat tests/${{matrix.sketches}}/build/build.options.json
95
+
83
96
# Our self-hosted runners run on an RPI, the setup-python action doesn't
84
97
# support an ARM architecture.
85
98
0 commit comments