@@ -39,15 +39,33 @@ jobs:
39
39
echo "$file was changed"
40
40
done
41
41
42
+ build-matrix :
43
+ name : Create matrix for building python tools binaries
44
+ runs-on : ubuntu-latest
45
+ needs : find-changed-tools
46
+ if : needs.find-changed-tools.outputs.any_changed == 'true'
47
+ outputs :
48
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
49
+ steps :
50
+ - name : Set matrix
51
+ id : set-matrix
52
+ run : |
53
+ matrix='["windows-latest", "macos-latest", "ubuntu-20.04"'
54
+ if [ '${{github.repository}}' == 'espressif/arduino-esp32' ]; then
55
+ matrix+=', "ARM", "ARM64"'
56
+ fi
57
+
58
+ echo "matrix=$matrix]" >> $GITHUB_OUTPUT
59
+
42
60
build-pytools-binaries :
43
61
name : Build python tools binaries for ${{ matrix.os }}
44
62
runs-on : ${{ matrix.os }}
45
- needs : find-changed-tools
63
+ needs : [ find-changed-tools, build-matrix]
46
64
if : needs.find-changed-tools.outputs.any_changed == 'true'
47
65
strategy :
48
66
fail-fast : false
49
67
matrix :
50
- os : [windows-latest, macos-latest, ubuntu-20.04, ARM, ARM64]
68
+ os : ${{ fromJson(needs.build-matrix.outputs.matrix) }}
51
69
include :
52
70
- os : windows-latest
53
71
TARGET : win64
@@ -108,7 +126,7 @@ jobs:
108
126
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/$tool.py
109
127
done
110
128
- name : Sign binaries
111
- if : matrix.os == 'windows-latest'
129
+ if : matrix.os == 'windows-latest' && env.CERTIFICATE != '' && env.CERTIFICATE_PASSWORD != ''
112
130
env :
113
131
CERTIFICATE : ${{ secrets.CERTIFICATE }}
114
132
CERTIFICATE_PASSWORD : ${{ secrets.CERTIFICATE_PASSWORD }}
0 commit comments