File tree Expand file tree Collapse file tree 5 files changed +30
-46
lines changed Expand file tree Collapse file tree 5 files changed +30
-46
lines changed Original file line number Diff line number Diff line change @@ -18,29 +18,14 @@ jobs:
1818 with :
1919 submodules : recursive
2020
21- - name : Set up ARM toolchain
22- uses : carlosperate/arm-none-eabi-gcc-action@v1
23- with :
24- release : ' 10.3-2021.10'
25-
26- - name : Set up Python
27- uses : actions/setup-python@v5
28- with :
29- python-version : ' 3.11'
30-
31- - name : Install Python dependencies
32- run : python -m pip install --upgrade pip crcmod
33-
34- - name : Build firmware
35- run : |
36- make clean
37- make TARGET=loaner-firmware
21+ - name : Build firmware (Docker)
22+ run : ./compile-with-docker.sh
3823
39- - name : Firmware size
40- run : arm-none-eabi-size loaner -firmware
24+ - name : List artifacts
25+ run : ls -l compiled -firmware
4126
4227 - name : Upload artifacts
43- uses : actions/upload-artifact@v3
28+ uses : actions/upload-artifact@v4
4429 with :
4530 name : loaner-firmware
46- path : loaner-firmware*.bin
31+ path : compiled-firmware/ loaner-firmware*.bin
Original file line number Diff line number Diff line change @@ -15,34 +15,19 @@ jobs:
1515 with :
1616 submodules : recursive
1717
18- - name : Set up ARM toolchain
19- uses : carlosperate/arm-none-eabi-gcc-action@v1
20- with :
21- release : ' 10.3-2021.10'
22-
23- - name : Set up Python
24- uses : actions/setup-python@v5
25- with :
26- python-version : ' 3.11'
27-
28- - name : Install Python dependencies
29- run : python -m pip install --upgrade pip crcmod
30-
31- - name : Build firmware
32- run : |
33- make clean
34- make TARGET=loaner-firmware
18+ - name : Build firmware (Docker)
19+ run : ./compile-with-docker.sh
3520
36- - name : Firmware size
37- run : arm-none-eabi-size loaner -firmware
21+ - name : List artifacts
22+ run : ls -l compiled -firmware
3823
3924 - name : Upload artifacts
40- uses : actions/upload-artifact@v3
25+ uses : actions/upload-artifact@v4
4126 with :
4227 name : loaner-firmware
43- path : loaner-firmware*.bin
28+ path : compiled-firmware/ loaner-firmware*.bin
4429
4530 - name : Create release
4631 uses : ncipollo/release-action@v1
4732 with :
48- artifacts : " loaner-firmware*.bin"
33+ artifacts : " compiled-firmware/ loaner-firmware*.bin"
Original file line number Diff line number Diff line change 1- #! /bin/sh
2- docker build -t uvk5 .
3- docker run -v $( PWD) /compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c " cd /app && make && cp firmware* compiled-firmware/"
1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ SCRIPT_DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
5+ OUT_DIR=" ${SCRIPT_DIR} /compiled-firmware"
6+ IMAGE_TAG=" uvk5-loaner"
7+
8+ mkdir -p " ${OUT_DIR} "
9+
10+ docker build -t " ${IMAGE_TAG} " " ${SCRIPT_DIR} "
11+
12+ docker run --rm \
13+ -v " ${OUT_DIR} " :/app/compiled-firmware \
14+ " ${IMAGE_TAG} " \
15+ /bin/bash -lc " cd /app && make clean && make TARGET=loaner-firmware && cp loaner-firmware*.bin compiled-firmware/"
You can’t perform that action at this time.
0 commit comments