Skip to content

Commit 0c279fc

Browse files
committed
actions: Set matrix strategy, generate default ELF signing key, upload artifacts
1 parent 1161122 commit 0c279fc

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/main.yml

+23-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ jobs:
99
build:
1010
name: build
1111
runs-on: arm-none-eabi-gcc
12+
13+
strategy:
14+
matrix:
15+
port:
16+
- name: nwdaq_br28_fdc
17+
target: firmware-sign
18+
- name: nwdaq_br28_fdc_bl
19+
target: firmware
20+
1221
steps:
1322

1423
- name: Setup arm-none-eabi-gcc path
@@ -30,10 +39,22 @@ jobs:
3039
echo PATH=$PATH >> $GITHUB_ENV
3140
echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
3241
42+
- name: Create default ELF signing key
43+
run: |
44+
python -c "import hashlib; import base64; print(base64.b64encode(hashlib.sha256(b'default-key').digest()).decode('utf-8'))" > elfsign.key
45+
scripts/elfsign.py --sk elfsign.key -p elfsign.pub
46+
3347
- name: Select the port
34-
run: defconfig config/nwdaq_br28_fdc_defconfig
48+
run: defconfig config/${{ matrix.port.name }}_defconfig
3549

3650
- name: Compile
3751
run: |
38-
scons firmware
52+
scons ${{ matrix.port.target }}
3953
54+
- name: Upload artifacts
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: ${{ matrix.port }}
58+
path: |
59+
bin/*
60+
.config

0 commit comments

Comments
 (0)