@@ -13,6 +13,16 @@ permissions:
1313jobs :
1414 build :
1515 runs-on : ubuntu-latest
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ variant :
20+ - name : ecm-rndis
21+ use_ecm : " 1"
22+ suffix : ecm-rndis
23+ - name : ncm
24+ use_ecm : " "
25+ suffix : ncm
1626
1727 steps :
1828 - name : Checkout repository
@@ -33,15 +43,34 @@ jobs:
3343 git clone --depth 1 https://github.com/raspberrypi/pico-sdk.git "$HOME/pico-sdk"
3444 git -C "$HOME/pico-sdk" submodule update --init
3545
46+ - name : Compute build metadata
47+ id : meta
48+ run : |
49+ echo "commit_id=$(git rev-parse --short=12 HEAD)" >> "$GITHUB_OUTPUT"
50+
3651 - name : Configure CMake
37- run : cmake -S . -B build -G Ninja -DPICO_SDK_PATH="$HOME/pico-sdk"
52+ run : |
53+ if [ -n "${{ matrix.variant.use_ecm }}" ]; then
54+ cmake -S . -B "build-${{ matrix.variant.suffix }}" -G Ninja \
55+ -DPICO_SDK_PATH="$HOME/pico-sdk" \
56+ -DCMAKE_C_FLAGS="-DUSE_ECM=${{ matrix.variant.use_ecm }}"
57+ else
58+ cmake -S . -B "build-${{ matrix.variant.suffix }}" -G Ninja \
59+ -DPICO_SDK_PATH="$HOME/pico-sdk"
60+ fi
3861
3962 - name : Build firmware
40- run : cmake --build build --parallel
63+ run : cmake --build "build-${{ matrix.variant.suffix }}" --parallel
64+
65+ - name : Rename UF2 artifact
66+ run : |
67+ mkdir -p dist
68+ cp "build-${{ matrix.variant.suffix }}/picowebserverspi.uf2" \
69+ "dist/maplelink-${{ steps.meta.outputs.commit_id }}-${{ matrix.variant.suffix }}.uf2"
4170
4271 - name : Upload UF2 artifact
4372 uses : actions/upload-artifact@v4
4473 with :
45- name : picowebserverspi -uf2
46- path : build/* .uf2
74+ name : maplelink-${{ matrix.variant.suffix }} -uf2
75+ path : dist/maplelink-${{ steps.meta.outputs.commit_id }}-${{ matrix.variant.suffix }} .uf2
4776 if-no-files-found : error
0 commit comments