@@ -51,20 +51,15 @@ jobs:
5151 if : inputs.debug || inputs.flags != ''
5252 run : |
5353 > custom-build && git add custom-build
54- - name : Get port
55- id : get-port
56- run : |
57- PORT=$(find ports/*/boards/ -type d -name ${{ inputs.board }} | sed 's/^ports\///g;s/\/boards.*//g')
58- if [ -z $PORT ]; then (exit 1); else echo >> $GITHUB_OUTPUT "port=$PORT"; fi
59- - name : Port to platform
60- run : echo >> $GITHUB_ENV "PLATFORM=${{ env[format('PLATFORM_{0}', steps.get-port.outputs.port)] }}"
6154 - name : Set up python
6255 uses : actions/setup-python@v4
6356 with :
6457 python-version : 3.x
6558 - name : Set up port
66- if : env.PLATFORM == 'esp'
67- uses : ./.github/actions/deps/ports/espressif
59+ id : set-up-port
60+ uses : ./.github/actions/deps/ports
61+ with :
62+ board : ${{ inputs.board }}
6863 - name : Set up submodules
6964 id : set-up-submodules
7065 uses : ./.github/actions/deps/submodules
7570 uses : ./.github/actions/deps/external
7671 with :
7772 action : cache
78- platform : ${{ env.PLATFORM }}
73+ platform : ${{ env[format('PLATFORM_{0}', steps.set-up-port.outputs.port)] }}
7974 - name : Set up mpy-cross
8075 if : steps.set-up-submodules.outputs.frozen == 'True'
8176 uses : ./.github/actions/mpy_cross
9691 mkfs.fat --version || true
9792 - name : Build board
9893 run : make -j2 ${{ inputs.flags }} BOARD=${{ inputs.board }} DEBUG=${{ inputs.debug && '1' || '0' }} TRANSLATION=${{ inputs.language }}
99- working-directory : ports/${{ steps.get -port.outputs.port }}
94+ working-directory : ports/${{ steps.set-up -port.outputs.port }}
10095 - name : Upload artifact
10196 uses : actions/upload-artifact@v3
10297 with :
10398 name : ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ inputs.flags != '' && '-custom' || '' }}${{ inputs.debug && '-debug' || '' }}
104- path : ports/${{ steps.get -port.outputs.port }}/build-${{ inputs.board }}/firmware.*
99+ path : ports/${{ steps.set-up -port.outputs.port }}/build-${{ inputs.board }}/firmware.*
0 commit comments