2020-09-27 07:10:00 -04:00
|
|
|
# GitHub Actions Workflow to build FreeRTOS Firmware for PineTime Smart Watch
|
|
|
|
# See https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud
|
2021-03-15 19:07:04 -04:00
|
|
|
# Based on https://github.com/JF002/InfiniTime/blob/master/doc/buildAndProgram.md
|
|
|
|
# and https://github.com/JF002/InfiniTime/blob/master/bootloader/README.md
|
2020-09-27 07:10:00 -04:00
|
|
|
|
|
|
|
# Name of this Workflow
|
|
|
|
name: Build PineTime Firmware
|
|
|
|
|
|
|
|
# When to run this Workflow...
|
|
|
|
on:
|
|
|
|
|
2021-09-10 17:42:49 -04:00
|
|
|
# Run this Workflow when files are updated (Pushed) in the "master" and "develop" Branch
|
2020-09-27 07:10:00 -04:00
|
|
|
push:
|
2021-09-10 17:42:49 -04:00
|
|
|
branches: [ master, develop ]
|
2020-09-27 07:10:00 -04:00
|
|
|
|
2021-09-10 17:42:49 -04:00
|
|
|
# Also run this Workflow when a Pull Request is created or updated in the "master" and "develop" Branch
|
2020-09-27 07:10:00 -04:00
|
|
|
pull_request:
|
2021-09-10 17:42:49 -04:00
|
|
|
branches: [ master, develop ]
|
2020-09-27 07:10:00 -04:00
|
|
|
|
|
|
|
# Steps to run for the Workflow
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-05-15 04:50:12 -04:00
|
|
|
container:
|
|
|
|
image: jf002/infinitime-build
|
2020-09-27 07:10:00 -04:00
|
|
|
steps:
|
2022-05-15 04:50:12 -04:00
|
|
|
- name: Workaround permission issues
|
|
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
2020-09-27 07:10:00 -04:00
|
|
|
- name: Checkout source files
|
|
|
|
uses: actions/checkout@v2
|
2021-08-14 08:47:00 -04:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-05-15 04:50:12 -04:00
|
|
|
- name: Build
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SOURCES_DIR: .
|
|
|
|
run: |
|
|
|
|
/opt/build.sh all
|
|
|
|
- name: Upload DFU artifacts
|
2020-09-27 07:10:00 -04:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-05-15 04:50:12 -04:00
|
|
|
name: InfiniTime DFU file
|
|
|
|
path: |
|
|
|
|
./build/output/pinetime-mcuboot-app-dfu-*.zip
|
|
|
|
- name: Upload MCUBoot image artifacts
|
2020-09-27 07:10:00 -04:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-05-15 04:50:12 -04:00
|
|
|
name: InfiniTime MCUBoot image file
|
|
|
|
path: |
|
|
|
|
./build/output/pinetime-mcuboot-app-image-*.bin
|