Skip to content

Commit f6248a8

Browse files
authored
Merge pull request #579 from mabuch/fix-github-build
fix Github Action build Firmware
2 parents 1635bfa + 40afae3 commit f6248a8

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
4646
if: steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
47-
uses: fiam/arm-none-eabi-gcc@v1.0.2
47+
uses: fiam/arm-none-eabi-gcc@v1.0.4
4848
with:
4949
# GNU Embedded Toolchain for Arm release name, in the V-YYYY-qZ format (e.g. "9-2019-q4")
5050
release: 9-2020-q2
@@ -83,10 +83,11 @@ jobs:
8383
if: steps.cache-mcuboot.outputs.cache-hit != 'true' # Install MCUBoot if not found in cache
8484
run: |
8585
cd ${{ runner.temp }}
86-
git clone --branch v1.5.0 https://github.com/JuulLabs-OSS/mcuboot
86+
git clone --branch v1.7.2 https://github.com/mcu-tools/mcuboot
8787
8888
- name: Install imgtool dependencies
89-
run: pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
89+
run: |
90+
pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
9091
9192
- name: Install adafruit-nrfutil
9293
run: |
@@ -99,6 +100,8 @@ jobs:
99100

100101
- name: Checkout source files
101102
uses: actions/checkout@v2
103+
with:
104+
submodules: recursive
102105

103106
- name: Show files
104107
run: set ; pwd ; ls -l
@@ -110,7 +113,7 @@ jobs:
110113
run: |
111114
mkdir -p build
112115
cd build
113-
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 ../
116+
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../
114117
115118
#########################################################################################
116119
# Make and Upload DFU Package
@@ -125,19 +128,10 @@ jobs:
125128
cd build
126129
make pinetime-mcuboot-app
127130
128-
- name: Create firmware image
129-
run: |
130-
# The generated firmware binary looks like "pinetime-mcuboot-app-0.8.2.bin"
131-
ls -l build/src/pinetime-mcuboot-app*.bin
132-
${{ runner.temp }}/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header build/src/pinetime-mcuboot-app*.bin build/src/pinetime-mcuboot-app-img.bin
133-
${{ runner.temp }}/mcuboot/scripts/imgtool.py verify build/src/pinetime-mcuboot-app-img.bin
134-
135-
- name: Create DFU package
131+
- name: Unzip DFU package
136132
run: |
137-
~/.local/bin/adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application build/src/pinetime-mcuboot-app-img.bin build/src/pinetime-mcuboot-app-dfu.zip
138-
unzip -v build/src/pinetime-mcuboot-app-dfu.zip
139133
# Unzip the package because Upload Artifact will zip up the files
140-
unzip build/src/pinetime-mcuboot-app-dfu.zip -d build/src/pinetime-mcuboot-app-dfu
134+
unzip build/src/pinetime-mcuboot-app-dfu*.zip -d build/src/pinetime-mcuboot-app-dfu
141135
142136
- name: Upload DFU package
143137
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)