@@ -127,60 +127,27 @@ jobs:
127127 - name : Checkout
128128 uses : actions/checkout@v4
129129
130- - name : Clean arduino-cli (self-hosted)
131- if : github.event.repository.private
132- run : rm -f $HOME/bin/arduino-cli
133-
134- - name : Set up Python (self-hosted)
135- if : github.event.repository.private
136- uses : actions/setup-python@v5
137- with :
138- python-version : ' 3.12'
139-
140- - name : Install yq (self-hosted)
141- if : github.event.repository.private
130+ - name : Prepare libraries list
131+ id : libs
142132 run : |
143- pip uninstall -y yq 2>/dev/null || true
144- mkdir -p $HOME/.local/bin
145- wget -qO $HOME/.local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
146- chmod +x $HOME/.local/bin/yq
147- echo "$HOME/.local/bin" >> $GITHUB_PATH
148-
149- - name : Compile examples (self-hosted)
150- if : github.event.repository.private
151- uses : arduino/compile-sketches@v1
152- with :
153- fqbn : ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
154- platforms : |
155- - name: ${{ matrix.platform }}:${{ matrix.archi }}
156- source-url: ${{ matrix.platform-url }}
157- version: ${{ matrix.platform-version }}
158- libraries : |
159- - source-url: https://github.com/m5stack/M5Unified.git
160- - source-url: https://github.com/m5stack/M5GFX.git
161- - source-url: https://github.com/m5stack/M5UnitUnified.git
162- - source-url: https://github.com/m5stack/M5HAL.git
163- - source-url: https://github.com/m5stack/M5Utility.git
164- - source-path: ./
165- sketch-paths : |
166- - examples/UnitUnified/${{ matrix.sketch }}
167- cli-compile-flags : |
168- - --build-property
169- - build.extra_flags=${{ matrix.build-properties }}
170-
171- - name : Compile examples (public)
172- if : ${{ !github.event.repository.private }}
133+ {
134+ echo "yaml<<EOF"
135+ echo "$REQUIRED_LIBRARIES" | tr ',' '\n' | while read -r lib; do
136+ echo "- name: $lib"
137+ done
138+ echo "- source-path: ./"
139+ echo "EOF"
140+ } >> "$GITHUB_OUTPUT"
141+
142+ - name : Compile examples
173143 uses : arduino/compile-sketches@v1
174144 with :
175145 fqbn : ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
176146 platforms : |
177147 - name: ${{ matrix.platform }}:${{ matrix.archi }}
178148 source-url: ${{ matrix.platform-url }}
179149 version: ${{ matrix.platform-version }}
180- libraries : |
181- - name: M5Unified
182- - name: M5UnitUnified
183- - source-path: ./
150+ libraries : ${{ steps.libs.outputs.yaml }}
184151 sketch-paths : |
185152 - examples/UnitUnified/${{ matrix.sketch }}
186153 cli-compile-flags : |
0 commit comments