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: Build PineTime Firmware
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-09-10 17:42:49 -04:00
|
|
|
branches: [ master, develop ]
|
2022-07-05 02:22:29 -04:00
|
|
|
paths-ignore:
|
|
|
|
- 'doc/**'
|
2022-08-10 19:42:17 -04:00
|
|
|
- '**.md'
|
2020-09-27 07:10:00 -04:00
|
|
|
pull_request:
|
2022-07-10 10:46:24 -04:00
|
|
|
branches: [ develop ]
|
2022-07-05 02:22:29 -04:00
|
|
|
paths-ignore:
|
|
|
|
- 'doc/**'
|
2022-08-10 19:42:17 -04:00
|
|
|
- '**.md'
|
2022-07-10 10:46:24 -04:00
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
2020-09-27 07:10:00 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-05-15 04:50:12 -04:00
|
|
|
container:
|
2022-05-18 15:53:06 -04:00
|
|
|
image: infinitime/infinitime-build
|
2020-09-27 07:10:00 -04:00
|
|
|
steps:
|
2022-05-15 05:05:10 -04: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 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: .
|
2022-05-27 04:36:55 -04:00
|
|
|
run: /opt/build.sh all
|
2022-05-27 04:31:17 -04:00
|
|
|
# Unzip the package because Upload Artifact will zip up the files
|
|
|
|
- name: Unzip DFU package
|
|
|
|
run: unzip ./build/output/pinetime-mcuboot-app-dfu-*.zip -d ./build/output/pinetime-mcuboot-app-dfu
|
2022-05-15 04:50:12 -04:00
|
|
|
- name: Upload DFU artifacts
|
2022-05-02 05:26:45 -04:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-09-27 07:10:00 -04:00
|
|
|
with:
|
2022-05-02 05:26:45 -04:00
|
|
|
name: InfiniTime DFU ${{ github.head_ref }}
|
2022-05-27 04:31:17 -04:00
|
|
|
path: ./build/output/pinetime-mcuboot-app-dfu/*
|
2022-05-15 04:50:12 -04:00
|
|
|
- name: Upload MCUBoot image artifacts
|
2022-05-02 05:26:45 -04:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-09-27 07:10:00 -04:00
|
|
|
with:
|
2022-05-02 05:26:45 -04:00
|
|
|
name: InfiniTime MCUBoot image ${{ github.head_ref }}
|
2022-05-27 04:36:55 -04:00
|
|
|
path: ./build/output/pinetime-mcuboot-app-image-*.bin
|