From fbb4e8c6ae461697e7151927205ce134eb26de53 Mon Sep 17 00:00:00 2001 From: mabuch Date: Sat, 14 Aug 2021 14:47:00 +0200 Subject: fix Github Action build Firmware --- .github/workflows/main.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to '.github/workflows') 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 -- cgit v1.2.3-70-g09d2 From 40afae3833efd2220bac168467d82e3ca6c350be Mon Sep 17 00:00:00 2001 From: mabuch Date: Sat, 14 Aug 2021 20:46:29 +0200 Subject: Github Action - update mcuboot version --- .github/workflows/main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f25fd311..4744eaef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,17 +83,12 @@ 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/mcu-tools/mcuboot + git clone --branch v1.7.2 https://github.com/mcu-tools/mcuboot - name: Install imgtool dependencies 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: | pip3 install --user wheel -- cgit v1.2.3-70-g09d2 From 3cc00771fa6528433b2ec4d787dc6bfefd948390 Mon Sep 17 00:00:00 2001 From: NeroBurner Date: Fri, 10 Sep 2021 23:42:49 +0200 Subject: Run CI on master and develop branch The documentation https://github.com/JF002/InfiniTime/blob/develop/doc/contribute.md#how-to-submit-a-pull-request- tells us to make pull requests against `develop` branch. Update the CI to run on those pull requests to have a check if the PR breaks something unintentionally. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4744eaef..bd24359a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,13 +9,13 @@ name: Build PineTime Firmware # When to run this Workflow... on: - # Run this Workflow when files are updated (Pushed) in the "master" Branch + # Run this Workflow when files are updated (Pushed) in the "master" and "develop" Branch push: - branches: [ master ] + branches: [ master, develop ] - # Also run this Workflow when a Pull Request is created or updated in the "master" Branch + # Also run this Workflow when a Pull Request is created or updated in the "master" and "develop" Branch pull_request: - branches: [ master ] + branches: [ master, develop ] # Steps to run for the Workflow jobs: -- cgit v1.2.3-70-g09d2