-
-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of JF/PineTime into master
- Loading branch information
Showing
189 changed files
with
4,698 additions
and
69,390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Build and push Docker image | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
paths: | ||
- 'docker/**' | ||
pull_request: | ||
branches: [ develop ] | ||
paths: | ||
- 'docker/**' | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
USERNAME: infinitime | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_LOGIN_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Set up Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ secrets.DOCKER_HUB_IMAGE_USERNAME || env.USERNAME }}/infinitime-build | ||
tags: | | ||
type=sha | ||
type=raw,value=latest | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
if: github.event_name != 'pull_request' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./docker/ | ||
file: ./docker/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_IMAGE_USERNAME || env.USERNAME }}/infinitime-build:buildcache | ||
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_IMAGE_USERNAME || env.USERNAME }}/infinitime-build:buildcache,mode=max | ||
|
||
- name: Build | ||
if: github.event_name == 'pull_request' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./docker/ | ||
file: ./docker/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: false | ||
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_IMAGE_USERNAME || env.USERNAME }}/infinitime-build:buildcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# 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 | ||
name: CI | ||
|
||
# Run this workflow whenever the build may be affected | ||
on: | ||
push: | ||
branches: [ master, develop ] | ||
paths-ignore: | ||
- 'doc/**' | ||
- '**.md' | ||
pull_request: | ||
branches: [ master, develop ] | ||
branches: [ develop ] | ||
paths-ignore: | ||
- 'doc/**' | ||
- '**.md' | ||
|
||
|
||
jobs: | ||
build: | ||
build-firmware: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: infinitime/infinitime-build | ||
|
@@ -45,3 +48,48 @@ jobs: | |
with: | ||
name: InfiniTime MCUBoot image ${{ github.head_ref }} | ||
path: ./build/output/pinetime-mcuboot-app-image-*.bin | ||
- name: Upload resources artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: InfiniTime resources ${{ github.head_ref }} | ||
path: ./build/output/infinitime-resources-*.zip | ||
|
||
build-simulator: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install cmake | ||
uses: lukka/[email protected] | ||
|
||
- name: Install SDL2 development package | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libsdl2-dev | ||
- name: Install lv_font_conv | ||
run: | ||
npm i -g [email protected] | ||
|
||
- name: Checkout source files | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Get InfiniSim repo | ||
run: | | ||
git clone https://github.com/InfiniTimeOrg/InfiniSim.git --depth 1 --branch main | ||
git -C InfiniSim submodule update --init lv_drivers libpng | ||
- name: CMake | ||
# disable BUILD_RESOURCES as this is already done when building the firmware | ||
run: | | ||
cmake -G Ninja -S InfiniSim -B build_lv_sim -DInfiniTime_DIR="${PWD}" -DBUILD_RESOURCES=OFF | ||
- name: Build simulator executable | ||
run: | | ||
cmake --build build_lv_sim | ||
- name: Upload simulator executable | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: infinisim-${{ github.head_ref }} | ||
path: build_lv_sim/infinisim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.