48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
# GitHub Actions Workflow to build FreeRTOS Firmware for PineTime Smart Watch
|
|
# See https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud
|
|
# Based on https://github.com/JF002/InfiniTime/blob/master/doc/buildAndProgram.md
|
|
# and https://github.com/JF002/InfiniTime/blob/master/bootloader/README.md
|
|
|
|
name: Build PineTime Firmware
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, develop ]
|
|
pull_request:
|
|
branches: [ master, develop ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: infinitime/infinitime-build
|
|
steps:
|
|
# 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).
|
|
- name: Workaround permission issues
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
- name: Checkout source files
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Build
|
|
shell: bash
|
|
env:
|
|
SOURCES_DIR: .
|
|
run: |
|
|
/opt/build.sh all
|
|
- name: Upload DFU artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: InfiniTime DFU file
|
|
path: |
|
|
./build/output/pinetime-mcuboot-app-dfu-*.zip
|
|
- name: Upload MCUBoot image artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: InfiniTime MCUBoot image file
|
|
path: |
|
|
./build/output/pinetime-mcuboot-app-image-*.bin
|