summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authormabuch <marcel.buechler@gmail.com>2021-08-14 14:47:00 +0200
committerGitHub <noreply@github.com>2021-08-14 14:47:00 +0200
commitfbb4e8c6ae461697e7151927205ce134eb26de53 (patch)
tree394a72113303d826913287b7c214df68f53372f1 /.github/workflows
parent643077341b14a52819cbaf02abbd5fb56cdeb802 (diff)
fix Github Action build Firmware
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml29
1 files changed, 14 insertions, 15 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 4a71b7e0..f25fd311 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -44,7 +44,7 @@ jobs:
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
if: steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
- uses: fiam/arm-none-eabi-gcc@v1.0.2
+ uses: fiam/arm-none-eabi-gcc@v1.0.4
with:
# GNU Embedded Toolchain for Arm release name, in the V-YYYY-qZ format (e.g. "9-2019-q4")
release: 9-2020-q2
@@ -83,10 +83,16 @@ jobs:
if: steps.cache-mcuboot.outputs.cache-hit != 'true' # Install MCUBoot if not found in cache
run: |
cd ${{ runner.temp }}
- git clone --branch v1.5.0 https://github.com/JuulLabs-OSS/mcuboot
+ git clone --branch v1.5.0 https://github.com/mcu-tools/mcuboot
- name: Install imgtool dependencies
- run: pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
+ run: |
+ pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
+
+ # cbor is a dependency that is not currently included in mcuboot requirements.txt
+ - name: Install imgtool dependencies (cbor)
+ run: |
+ pip3 install --user cbor
- name: Install adafruit-nrfutil
run: |
@@ -99,6 +105,8 @@ jobs:
- name: Checkout source files
uses: actions/checkout@v2
+ with:
+ submodules: recursive
- name: Show files
run: set ; pwd ; ls -l
@@ -110,7 +118,7 @@ jobs:
run: |
mkdir -p build
cd build
- cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 ../
+ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../
#########################################################################################
# Make and Upload DFU Package
@@ -125,19 +133,10 @@ jobs:
cd build
make pinetime-mcuboot-app
- - name: Create firmware image
- run: |
- # The generated firmware binary looks like "pinetime-mcuboot-app-0.8.2.bin"
- ls -l build/src/pinetime-mcuboot-app*.bin
- ${{ 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
- ${{ runner.temp }}/mcuboot/scripts/imgtool.py verify build/src/pinetime-mcuboot-app-img.bin
-
- - name: Create DFU package
+ - name: Unzip DFU package
run: |
- ~/.local/bin/adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application build/src/pinetime-mcuboot-app-img.bin build/src/pinetime-mcuboot-app-dfu.zip
- unzip -v build/src/pinetime-mcuboot-app-dfu.zip
# Unzip the package because Upload Artifact will zip up the files
- unzip build/src/pinetime-mcuboot-app-dfu.zip -d build/src/pinetime-mcuboot-app-dfu
+ unzip build/src/pinetime-mcuboot-app-dfu*.zip -d build/src/pinetime-mcuboot-app-dfu
- name: Upload DFU package
uses: actions/upload-artifact@v2