|
1 | | -# GitHub Actions Workflow to build FreeRTOS Firmware for PineTime Smart Watch |
2 | | -# See https://lupyuen.github.io/pinetime-rust-mynewt/articles/cloud |
3 | | -# Based on https://github.com/JF002/InfiniTime/blob/master/doc/buildAndProgram.md |
4 | | -# and https://github.com/JF002/InfiniTime/blob/master/bootloader/README.md |
5 | | - |
6 | | -name: Build PineTime Firmware |
| 1 | +name: CI |
7 | 2 |
|
| 3 | +# Run this workflow whenever the build may be affected |
8 | 4 | on: |
9 | 5 | push: |
10 | 6 | branches: [ master, develop ] |
|
14 | 10 | branches: [ develop ] |
15 | 11 | paths-ignore: |
16 | 12 | - 'doc/**' |
17 | | - # Allows you to run this workflow manually from the Actions tab |
18 | | - workflow_dispatch: |
19 | 13 |
|
20 | 14 | jobs: |
21 | | - build: |
| 15 | + build-firmware: |
22 | 16 | runs-on: ubuntu-latest |
23 | 17 | container: |
24 | 18 | image: infinitime/infinitime-build |
|
51 | 45 | with: |
52 | 46 | name: InfiniTime MCUBoot image ${{ github.head_ref }} |
53 | 47 | path: ./build/output/pinetime-mcuboot-app-image-*.bin |
| 48 | + |
| 49 | + build-simulator: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + steps: |
| 52 | + - name: Install cmake |
| 53 | + |
| 54 | + |
| 55 | + - name: Install SDL2 development package |
| 56 | + run: | |
| 57 | + sudo apt-get update |
| 58 | + sudo apt-get -y install libsdl2-dev |
| 59 | +
|
| 60 | + - name: Install lv_font_conv |
| 61 | + run: |
| 62 | + |
| 63 | + |
| 64 | + - name: Checkout source files |
| 65 | + uses: actions/checkout@v2 |
| 66 | + with: |
| 67 | + submodules: recursive |
| 68 | + |
| 69 | + - name: Get InfiniSim repo |
| 70 | + run: | |
| 71 | + git clone https://github.com/InfiniTimeOrg/InfiniSim.git --depth 1 --branch main |
| 72 | + git -C InfiniSim submodule update --init lv_drivers libpng |
| 73 | +
|
| 74 | + - name: CMake |
| 75 | + run: | |
| 76 | + cmake -G Ninja -S InfiniSim -B build_lv_sim -DInfiniTime_DIR="${PWD}" |
| 77 | +
|
| 78 | + - name: Build simulator executable |
| 79 | + run: | |
| 80 | + cmake --build build_lv_sim |
| 81 | +
|
| 82 | + - name: Upload simulator executable |
| 83 | + uses: actions/upload-artifact@v3 |
| 84 | + with: |
| 85 | + name: infinisim-${{ github.head_ref }} |
| 86 | + path: build_lv_sim/infinisim |
0 commit comments