@@ -25,21 +25,20 @@ jobs:
25
25
run : |
26
26
source $GITHUB_WORKSPACE/travis/common.sh
27
27
cd $GITHUB_WORKSPACE
28
- echo -en "::set-output name=matrix::"
29
- echo -en "["
30
28
31
- get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp8266 1.6.13 esp8266com:esp8266:generic:xtal=80
32
- echo -en ","
29
+ echo -en "matrix=" >> $GITHUB_OUTPUT
30
+ echo -en "[" >> $GITHUB_OUTPUT
33
31
34
- get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp8266 1.6.13 esp8266com :esp8266:generic:xtal=80,dbg=Serial1
35
- echo -en ","
32
+ get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp8266 0.35.3 esp8266 :esp8266:generic:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,ResetMethod=nodemcu,CrystalFreq=26,FlashFreq=80,FlashMode=qio,eesz=4M2M,led=2,sdk=nonosdk_190703,ip=lm2f, dbg=Serial1,lvl=SSL,wipe=none,baud=115200 >> $GITHUB_OUTPUT
33
+ echo -en "," >> $GITHUB_OUTPUT
36
34
37
- get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp8266 1.8.13 esp8266com :esp8266:generic:xtal=80,eesz=1M,FlashMode=qio, FlashFreq=80
38
- echo -en ","
35
+ get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp8266 0.35.3 esp8266 :esp8266:generic:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,ResetMethod=nodemcu,CrystalFreq=26, FlashFreq=80,FlashMode=qio,eesz=4M2M,led=2,sdk=nonosdk_190703,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 >> $GITHUB_OUTPUT
36
+ echo -en "," >> $GITHUB_OUTPUT
39
37
40
- get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp32 1.8.13 espressif :esp32:esp32:FlashFreq=80
38
+ get_sketches_json_matrix arduino $GITHUB_WORKSPACE/examples esp32 0.35.3 esp32 :esp32:esp32:FlashFreq=80 >> $GITHUB_OUTPUT
41
39
42
- echo -en "]"
40
+ echo -en "]" >> $GITHUB_OUTPUT
41
+ echo >> $GITHUB_OUTPUT
43
42
outputs :
44
43
matrix : ${{ steps.set-matrix.outputs.matrix }}
45
44
@@ -48,33 +47,42 @@ jobs:
48
47
strategy :
49
48
fail-fast : false
50
49
matrix :
51
- IDE_VERSION : [1.8.13, 1.6.13 ]
50
+ CLI_VERSION : [0.35.3 ]
52
51
env :
53
- IDE_VERSION : ${{ matrix.IDE_VERSION }}
52
+ CLI_VERSION : ${{ matrix.CLI_VERSION }}
53
+ ARDUINO_DIRECTORIES_DATA : /home/runner/arduino_ide
54
54
55
55
steps :
56
56
- uses : actions/checkout@v2
57
57
58
- - name : Get Date
59
- id : get-date
58
+ - name : Get hash
59
+ id : get-hash
60
60
run : |
61
- echo "::set-output name=date:: $(/bin/date -u "+%Y%m%d")"
61
+ echo "hash= $(/bin/date -u "+%Y%m%d")-$(md5sum ".github/workflows/main.yml" | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
62
62
shell : bash
63
63
64
- - uses : actions/cache@v2
64
+ - uses : actions/cache@v3
65
65
id : cache_all
66
66
with :
67
67
path : |
68
68
/home/runner/arduino_ide
69
69
/home/runner/Arduino
70
- key : ${{ runner.os }}-${{ steps.get-date .outputs.date }}-${{ matrix.IDE_VERSION }}
70
+ key : ${{ runner.os }}-${{ steps.get-hash .outputs.hash }}-${{ matrix.CLI_VERSION }}-cli
71
71
72
72
- name : download IDE
73
73
if : steps.cache_all.outputs.cache-hit != 'true'
74
74
run : |
75
- wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz -q
76
- tar xf arduino-$IDE_VERSION-linux64.tar.xz
77
- mv arduino-$IDE_VERSION $HOME/arduino_ide
75
+ wget https://github.com/arduino/arduino-cli/releases/download/v${CLI_VERSION}/arduino-cli_${CLI_VERSION}_Linux_64bit.tar.gz -q
76
+ tar xf arduino-cli_${CLI_VERSION}_Linux_64bit.tar.gz
77
+ mkdir -p $ARDUINO_DIRECTORIES_DATA
78
+ mv arduino-cli $ARDUINO_DIRECTORIES_DATA/
79
+
80
+ - name : download cores
81
+ if : steps.cache_all.outputs.cache-hit != 'true'
82
+ run : |
83
+ export PATH="$ARDUINO_DIRECTORIES_DATA:$PATH"
84
+ source $GITHUB_WORKSPACE/travis/common.sh
85
+ get_core_cli
78
86
79
87
- name : download ArduinoJson
80
88
if : steps.cache_all.outputs.cache-hit != 'true'
@@ -114,17 +122,11 @@ jobs:
114
122
source $GITHUB_WORKSPACE/travis/common.sh
115
123
clone_library https://github.com/Bodmer/TFT_eSPI
116
124
117
- - name : download esp8266
125
+ - name : download LovyanGFX
118
126
if : steps.cache_all.outputs.cache-hit != 'true'
119
127
run : |
120
128
source $GITHUB_WORKSPACE/travis/common.sh
121
- get_core esp8266
122
-
123
- - name : download esp32
124
- if : steps.cache_all.outputs.cache-hit != 'true' && matrix.IDE_VERSION != '1.6.13'
125
- run : |
126
- source $GITHUB_WORKSPACE/travis/common.sh
127
- get_core esp32
129
+ clone_library https://github.com/lovyan03/LovyanGFX
128
130
129
131
build :
130
132
needs : [prepare_ide, prepare_example_json]
@@ -138,6 +140,7 @@ jobs:
138
140
BOARD : ${{ matrix.board }}
139
141
IDE_VERSION : ${{ matrix.ideversion }}
140
142
SKETCH : ${{ matrix.sketch }}
143
+ ARDUINO_DIRECTORIES_DATA : /home/runner/arduino_ide
141
144
142
145
# Steps represent a sequence of tasks that will be executed as part of the job
143
146
steps :
@@ -147,59 +150,44 @@ jobs:
147
150
run : |
148
151
sudo apt-get install -y libgtk2.0-0
149
152
150
- - name : Get Date
151
- id : get-date
153
+ - name : Get hash
154
+ id : get-hash
152
155
run : |
153
- echo "::set-output name=date:: $(/bin/date -u "+%Y%m%d")"
156
+ echo "hash= $(/bin/date -u "+%Y%m%d")-$(md5sum ".github/workflows/main.yml" | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
154
157
shell : bash
155
158
156
- - uses : actions/cache@v2
159
+ - uses : actions/cache@v3
157
160
id : cache_all
158
161
with :
159
162
path : |
160
163
/home/runner/arduino_ide
161
164
/home/runner/Arduino
162
- key : ${{ runner.os }}-${{ steps.get-date .outputs.date }}-${{ matrix.ideversion }}
165
+ key : ${{ runner.os }}-${{ steps.get-hash .outputs.hash }}-${{ matrix.cliversion }}-cli
163
166
164
167
- name : install python serial
165
168
if : matrix.cpu == 'esp32'
166
169
run : |
167
170
sudo pip3 install pyserial
168
171
sudo pip install pyserial
169
- # sudo apt install python-is-python3
170
-
171
- - name : start DISPLAY
172
- run : |
173
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
174
- export DISPLAY=:1.0
175
- sleep 3
176
172
177
173
- name : test IDE
178
174
run : |
179
- export PATH="$HOME/arduino_ide :$PATH"
180
- which arduino
175
+ export PATH="$ARDUINO_DIRECTORIES_DATA :$PATH"
176
+ which arduino-cli
181
177
182
178
- name : copy code
183
179
run : |
184
180
mkdir -p $HOME/Arduino/libraries/
185
181
cp -r $GITHUB_WORKSPACE $HOME/Arduino/libraries/arduinoVNC
186
182
187
- - name : config IDE
188
- run : |
189
- export DISPLAY=:1.0
190
- export PATH="$HOME/arduino_ide:$PATH"
191
- arduino --board $BOARD --save-prefs
192
- arduino --get-pref sketchbook.path
193
- arduino --pref update.check=false
194
-
195
183
- name : build example
196
184
timeout-minutes : 20
197
185
run : |
198
- export DISPLAY=:1.0
186
+ set -ex
199
187
export PATH="$HOME/arduino_ide:$PATH"
200
188
source $GITHUB_WORKSPACE/travis/common.sh
201
189
cd $GITHUB_WORKSPACE
202
- build_sketch arduino $SKETCH
190
+ build_sketch_cli " $SKETCH" "$BOARD"
203
191
204
192
done :
205
193
needs : [prepare_ide, prepare_example_json, build]
0 commit comments