2020-09-27 13:10:00 +02:00
|
|
|
# GitHub Actions Workflow to build FreeRTOS Firmware for PineTime Smart Watch
|
|
|
|
# See https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud
|
2021-03-16 00:07:04 +01: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 13:10:00 +02:00
|
|
|
|
|
|
|
name: Build PineTime Firmware
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-09-10 23:42:49 +02:00
|
|
|
branches: [ master, develop ]
|
2020-09-27 13:10:00 +02:00
|
|
|
pull_request:
|
2021-09-10 23:42:49 +02:00
|
|
|
branches: [ master, develop ]
|
2020-09-27 13:10:00 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-05-15 10:50:12 +02:00
|
|
|
container:
|
2022-05-18 21:53:06 +02:00
|
|
|
image: infinitime/infinitime-build
|
2020-09-27 13:10:00 +02:00
|
|
|
steps:
|
2022-05-15 11:05:10 +02:00
|
|
|
# This workaround fixes the error "unsafe repository (REPO is owned by someone else)".
|
|
|
|
# See https://github.com/actions/checkout/issues/760 and https://github.com/actions/checkout/issues/766
|
|
|
|
# The fix in "actions/checkout@v2" was not sufficient as the build process also uses git (to get the current
|
|
|
|
# commit hash, for example).
|
2022-05-15 10:50:12 +02:00
|
|
|
- name: Workaround permission issues
|
|
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
2020-09-27 13:10:00 +02:00
|
|
|
- name: Checkout source files
|
|
|
|
uses: actions/checkout@v2
|
2021-08-14 14:47:00 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-05-15 10:50:12 +02:00
|
|
|
- name: Build
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SOURCES_DIR: .
|
|
|
|
run: |
|
|
|
|
/opt/build.sh all
|
|
|
|
- name: Upload DFU artifacts
|
2020-09-27 13:10:00 +02:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-05-15 10:50:12 +02:00
|
|
|
name: InfiniTime DFU file
|
|
|
|
path: |
|
|
|
|
./build/output/pinetime-mcuboot-app-dfu-*.zip
|
|
|
|
- name: Upload MCUBoot image artifacts
|
2020-09-27 13:10:00 +02:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-05-15 10:50:12 +02:00
|
|
|
name: InfiniTime MCUBoot image file
|
|
|
|
path: |
|
|
|
|
./build/output/pinetime-mcuboot-app-image-*.bin
|