2022-08-25 01:32:46 -04:00
|
|
|
name: CI
|
2020-09-27 07:10:00 -04:00
|
|
|
|
2022-08-25 01:32:46 -04:00
|
|
|
# Run this workflow whenever the build may be affected
|
2020-09-27 07:10:00 -04:00
|
|
|
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-08-25 05:34:12 -04:00
|
|
|
|
2020-09-27 07:10:00 -04:00
|
|
|
|
|
|
|
jobs:
|
2022-08-25 01:32:46 -04:00
|
|
|
build-firmware:
|
2020-09-27 07:10:00 -04:00
|
|
|
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:
|
|
|
|
- name: Checkout source files
|
2023-01-07 11:14:05 -05:00
|
|
|
uses: actions/checkout@v3
|
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
|
2022-10-11 11:25:40 -04:00
|
|
|
- name: Upload resources artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: InfiniTime resources ${{ github.head_ref }}
|
|
|
|
path: ./build/output/infinitime-resources-*.zip
|
2022-08-25 01:32:46 -04:00
|
|
|
|
|
|
|
build-simulator:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install cmake
|
|
|
|
uses: lukka/get-cmake@v3.18.3
|
|
|
|
|
|
|
|
- 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 lv_font_conv@1.5.2
|
|
|
|
|
|
|
|
- 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
|
2022-10-11 16:30:51 -04:00
|
|
|
# disable BUILD_RESOURCES as this is already done when building the firmware
|
2022-08-25 01:32:46 -04:00
|
|
|
run: |
|
2022-10-11 16:30:51 -04:00
|
|
|
cmake -G Ninja -S InfiniSim -B build_lv_sim -DInfiniTime_DIR="${PWD}" -DBUILD_RESOURCES=OFF
|
2022-08-25 01:32:46 -04:00
|
|
|
|
|
|
|
- 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
|