Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
e9925ff
ci: expand test workflow to cover multiple boards
Mearman Jan 13, 2026
adac7d1
chore: improve build system for test reliability
Mearman Jan 13, 2026
943da87
fix: use gbitmap_get_data_row_info for circular format support
Mearman Jan 13, 2026
5498d9c
fix: prevent negative width in menu cell text layout
Mearman Jan 13, 2026
dacbaf9
fix: use exclusive boundary for timeline future direction
Mearman Jan 13, 2026
7fbbcb3
fix: prioritize non-persistent events for first_event in peek
Mearman Jan 13, 2026
e6b7f1c
fix: rewrite data logging storage reallocation
Mearman Jan 13, 2026
b14e85d
fix: add reset functions for test isolation
Mearman Jan 13, 2026
1323151
fix: add alignment attributes for packed structures
Mearman Jan 13, 2026
7300375
fix: correct silk display configuration
Mearman Jan 13, 2026
ae573a1
fix: graceful fallback for missing glance icon
Mearman Jan 13, 2026
07d0346
chore: add ANCS known app fallback definitions
Mearman Jan 13, 2026
ee810ed
fix: add conditional compilation for unit test builds
Mearman Jan 13, 2026
97cdd5b
test: add reset functions for activity and app order services
Mearman Jan 13, 2026
800f2f9
test: add cleanup functions and new stubs for test isolation
Mearman Jan 13, 2026
db3f3fd
test: update test infrastructure and utilities
Mearman Jan 13, 2026
7d77d9c
test: update graphics tests for improved coverage
Mearman Jan 13, 2026
59dd3c0
test: update service tests with proper state reset
Mearman Jan 13, 2026
90ddeeb
test: update remaining tests for robustness
Mearman Jan 13, 2026
5f4caee
test: update resource loading configuration for test platforms
Mearman Jan 13, 2026
509dc15
test: update test resource fixtures
Mearman Jan 13, 2026
8352581
test: add graphics test PBI fixtures
Mearman Jan 13, 2026
8aa2d49
test: update PNG test image fixtures
Mearman Jan 13, 2026
6a856b8
feat: add GOTHIC_18_COMPRESSED RLE4 font for test coverage
Mearman Jan 13, 2026
479309e
fix: add silk platform to color format detection in test PNG conversion
Mearman Jan 13, 2026
f594ed3
ci: disable fail-fast for all matrix builds
Mearman Jan 13, 2026
824df46
fix: remove test_app_fetch_endpoint from BROKEN_TESTS
Mearman Jan 13, 2026
dec7e97
fix: update libclang platform detection for Python 3
Mearman Jan 13, 2026
0c14cb5
test: fix test_graphics_draw_text_flow build
Mearman Jan 13, 2026
c1f7dda
test: fix test_perimeter build
Mearman Jan 13, 2026
5f0b21a
test: fix ancs and timeline actions test builds
Mearman Jan 13, 2026
ebba355
test: fix math library tests build
Mearman Jan 13, 2026
ea6c09f
test: fix 14 BLE/BT test builds
Mearman Jan 13, 2026
297ff33
test: fix final 6 BROKEN_TESTS - all tests now build
Mearman Jan 14, 2026
b1dfbaf
ci: install libclang in all Docker-based workflows
Mearman Jan 14, 2026
f956f0d
fix: search versioned llvm directories for libclang.so
Mearman Jan 14, 2026
d054ec9
fix: install libclang-17-dev for Python clang compatibility
Mearman Jan 14, 2026
f171e06
fix: upgrade Python clang package for libclang compatibility
Mearman Jan 14, 2026
352e766
fix: use libclang-18 with upgraded Python clang bindings
Mearman Jan 14, 2026
913e56a
fix: rely on Docker image's Python clang package
Mearman Jan 14, 2026
a93891f
fix: remove libclang installation, use Docker's version
Mearman Jan 14, 2026
3521a62
fix: install libclang-14 for Python clang compatibility
Mearman Jan 14, 2026
49b4dee
revert: match upstream CI configuration
Mearman Jan 14, 2026
642a2a2
revert: remove clang from requirements.txt
Mearman Jan 14, 2026
eec467c
feat: add missing resources for GETAFIX platform
Mearman Jan 14, 2026
0755abd
feat: add missing resources for asterix (GETAFIX) platform
Mearman Jan 14, 2026
ac0306b
fix: add missing stride shoe resources and AGENCY_FB fonts to BB2 pla…
Mearman Jan 14, 2026
841a8d4
ci: expand CI matrices to include all board permutations
Mearman Jan 14, 2026
74145c2
fix: handle JS_TOOLING_SCRIPT as list or single node in SDK build
Mearman Jan 14, 2026
7a73f2e
ci: exclude silk_flint from CI matrices due to missing mag driver
Mearman Jan 14, 2026
acef0ed
ci: exclude robert_bb and cutts_bb from CI due to stm32_stdlib linkin…
Mearman Jan 14, 2026
e8c2e9b
fix: handle empty JS_TOOLING_SCRIPT list in SDK build
Mearman Jan 14, 2026
7f7f694
ci: exclude robert_es from CI due to stm32_stdlib linking error
Mearman Jan 14, 2026
82be6d8
ci: exclude all robert board variants from CI due to stm32_stdlib lin…
Mearman Jan 14, 2026
3e28166
ci: exclude all tintin board variants from CI due to stm32_stdlib lin…
Mearman Jan 14, 2026
4351467
ci: restore multi-platform matrices to all CI workflows
Mearman Jan 14, 2026
278314b
ci: add --js-engine=none to macOS and Linux native builds
Mearman Jan 14, 2026
f32c91b
ci: add --js-engine=none to Linux native QEMU builds
Mearman Jan 14, 2026
583a738
ci: fix outstanding CI issues
Mearman Jan 14, 2026
6625108
fix: restore excluded boards to CI by fixing root causes
Mearman Jan 14, 2026
34e8ad2
revert: undo submodule commits, will use compiler flags instead
Mearman Jan 14, 2026
d218569
fix: suppress maybe-uninitialized warnings for NRF52/SF32LB52 boards
Mearman Jan 14, 2026
8cd61d7
fix: use sudo for libclang installation on Linux native
Mearman Jan 14, 2026
fe3b4fb
fix: update code to use non-SMALL stride resources
Mearman Jan 14, 2026
9e5df2c
fix: add conditional include for GATTAPI.h in fake_GATTAPI.h
Mearman Jan 14, 2026
ffc98e0
fix: add comprehensive dummy type definitions for GATTAPI.h
Mearman Jan 14, 2026
d5c6b8f
fix: add proper structure field definitions for GATTAPI types
Mearman Jan 14, 2026
4fbf3e9
fix: correct callback signature and add missing GATTAPI types
Mearman Jan 14, 2026
0359cd3
fix: remove silk from GATT test platforms
Mearman Jan 14, 2026
782c6cb
fix: make GATT test fakes conditional on GATTAPI.h availability
Mearman Jan 14, 2026
9eb82a7
fix: make GAP test fakes conditional on GAPAPI.h availability
Mearman Jan 14, 2026
f2283fb
fix: provide dummy GAPAPI implementations for non-GAPAPI platforms
Mearman Jan 14, 2026
8022eb3
fix: add music service sources to test_ams link
Mearman Jan 14, 2026
b093139
docs: add platform and hardware codename documentation to README
Mearman Jan 14, 2026
5d5c36e
fix: make new_timer fake functions static inline
Mearman Jan 14, 2026
8031702
docs: fix devices table formatting in README
Mearman Jan 14, 2026
b73e8da
fix: use forward declarations for GAPAPI types
Mearman Jan 14, 2026
f88ee91
fix: move new_timer fake implementations to .c file
Mearman Jan 14, 2026
923bcc5
fix: add fake_new_timer.c to tests using regular_timer.c
Mearman Jan 14, 2026
d21d0cb
fix: remove fake_pbl_malloc.h include from fake_new_timer.c
Mearman Jan 14, 2026
84112ef
fix: make kernel_malloc/kernel_free static in fake_new_timer.c
Mearman Jan 14, 2026
3ab46d7
fix: remove kernel_malloc/kernel_free stubs from fake_new_timer.c
Mearman Jan 14, 2026
18888bb
fix: include clar_asserts.h in fake_pbl_malloc.h
Mearman Jan 14, 2026
a861c3a
fix: use subprocess for pip freeze to respect venv
Mearman Jan 14, 2026
c7e3b7e
fix: avoid multiple definition conflicts with stubs_pbl_malloc.h
Mearman Jan 14, 2026
0c8b959
fix: use subprocess for rm to avoid Python 3.14 compatibility issues
Mearman Jan 14, 2026
be86f97
fix: include stddef.h and stdlib.h for size_t in fake_new_timer.h
Mearman Jan 14, 2026
ebe5c40
fix: remove extra AGENCY_FB fonts causing resource size overflow
Mearman Jan 14, 2026
a4d84d3
fix: remove trailing comma in spalding resource_map.json
Mearman Jan 15, 2026
bc22828
fix: resolve test linker and compilation errors
Mearman Jan 15, 2026
23d64db
test: disable broken test_ams tests
Mearman Jan 15, 2026
6db66cd
fix: use correct test name for BROKEN_TESTS list
Mearman Jan 15, 2026
d1e34bd
fix: remove fake_system_task.c to avoid multiple definition errors
Mearman Jan 15, 2026
f96d82b
fix: remove fake_system_task.c from test_ams sources
Mearman Jan 15, 2026
c9a47e7
fix: add static keyword to fake_new_timer functions
Mearman Jan 15, 2026
a81c44f
test: fix GATT/GAP API test compilation issues
Mearman Jan 15, 2026
c0a346d
test: fix missing Bluetooth driver and button ID stubs
Mearman Jan 15, 2026
10c45fc
test: fix BOM encoding issue and include missing stub
Mearman Jan 15, 2026
4d6f9f2
test: remove duplicate function definitions from stubs_gap_le_advert.h
Mearman Jan 15, 2026
d033726
test: fix missing timer stubs and bluetooth persistent storage override
Mearman Jan 15, 2026
827d028
test: add missing stubs_bt_driver_gatt_client_discovery.h includes
Mearman Jan 15, 2026
1c8753e
Revert "test: add missing stubs_bt_driver_gatt_client_discovery.h inc…
Mearman Jan 15, 2026
0a20991
test: make GATT driver stubs self-contained
Mearman Jan 15, 2026
693a949
test: add BSCAPI.h stub and fix GATT driver stubs
Mearman Jan 15, 2026
bc2b7c0
fix: add static inline to bt_driver stub functions
Mearman Jan 15, 2026
faebad5
fix: move bt_driver stub implementations from headers to .c files
Mearman Jan 15, 2026
8a546d5
fix: remove GATTAPI_AVAILABLE conditional guard from test fakes
Mearman Jan 15, 2026
f513f55
fix: add stub implementations for Linux/Docker when GATTAPI.h unavail…
Mearman Jan 15, 2026
a509a0b
ci: enable fail-fast for all CI matrix jobs
Mearman Jan 15, 2026
da3d4a3
fix: add stub for bt_driver_gatt_get_watchdog_timer_id
Mearman Jan 15, 2026
ebb3ea9
fix: add fake_new_timer.c to gatt_service_changed tests
Mearman Jan 15, 2026
bb03c22
fix: add missing fake_new_timer.c and stub for prv_contains_service_c…
Mearman Jan 15, 2026
1394e1e
fix: add missing stubs to test_ancs
Mearman Jan 15, 2026
c243ffb
fix: remove duplicate stubs_system_task.h include from test_ancs
Mearman Jan 15, 2026
fb03001
fix: remove stubs_pebble_tasks.h include from test_ancs
Mearman Jan 15, 2026
0e767d9
fix: add fake_new_timer.c to test_flash_api
Mearman Jan 15, 2026
faeed93
fix: add perimeter function implementations to test_graphics_draw_tex…
Mearman Jan 15, 2026
451d2b0
fix: correct hrm_enable return type in test_hrm_manager
Mearman Jan 15, 2026
ffa8d80
fix: add perimeter function implementations to test_perimeter
Mearman Jan 15, 2026
2ebcc06
fix: add fake_new_timer.c to activity tests using regular_timer.c
Mearman Jan 15, 2026
7e4f236
fix: add stubs for bluetooth persistent storage test
Mearman Jan 15, 2026
1a2ffa5
fix: remove launcher_task_add_callback from stubs_event_loop.h
Mearman Jan 15, 2026
1c6cf6b
fix: add conditional stub for launcher_task_add_callback
Mearman Jan 15, 2026
49004bc
fix: add framebuffer implementation to compositor test
Mearman Jan 15, 2026
d6b460d
fix: add framebuffer_get_size_bytes stub to avoid conflicts
Mearman Jan 15, 2026
1fe3e6b
fix: remove undefined constant from framebuffer stub
Mearman Jan 15, 2026
681a1ac
test: add fake_new_timer.c to test_calendar configuration
Mearman Jan 15, 2026
da61d20
test: add fake_new_timer.c to test_timeline_peek_event configuration
Mearman Jan 15, 2026
ab07aa2
test: add fake_new_timer.c to test_put_bytes configuration
Mearman Jan 15, 2026
10dd0b5
fix: add missing string continuation in test_put_bytes configuration
Mearman Jan 15, 2026
f4ca18c
test: add fake_new_timer.c to test_analytics and test_evented_timer
Mearman Jan 15, 2026
14ce49d
test: add fake_new_timer.c to test_light configuration
Mearman Jan 15, 2026
bbef2c7
test: add fake_new_timer.c to test_debounced_connection_service
Mearman Jan 15, 2026
0fb59ab
test: add fake_new_timer.c to test_battery_monitor and test_data_logging
Mearman Jan 15, 2026
f8e285b
test: add fake_new_timer.c to test_wakeup and test_migrate_wakeup
Mearman Jan 15, 2026
291ef67
test: add fake_new_timer.c to test_audio_endpoint configuration
Mearman Jan 15, 2026
31f6fa8
test: add platforms restriction to test_audio_endpoint
Mearman Jan 15, 2026
113beab
fix: remove app_fetch_endpoint.c from test_app_fetch_endpoint configu…
Mearman Jan 15, 2026
7cab31b
fix: make AppFetchCommand and AppFetchResponse static
Mearman Jan 15, 2026
fd4d17d
test: add fake_new_timer.c to test_do_not_disturb and test_smartstrap…
Mearman Jan 15, 2026
ab47191
test: add fake_new_timer.c to test_vibe configuration
Mearman Jan 15, 2026
fae7b08
test: add fake_new_timer.c to test_hrm_manager configuration
Mearman Jan 15, 2026
6c39ef8
test: add fake_new_timer.c to test_display_calibration_prompt configu…
Mearman Jan 15, 2026
c6dfe57
test: add fake_new_timer.c to test_animation configuration
Mearman Jan 15, 2026
f99a115
test: add fake_new_timer.c to test_alarm_smart configuration
Mearman Jan 15, 2026
c99f103
test: add fake_new_timer.c to test_app_manager and test_process_manager
Mearman Jan 16, 2026
4e2acc4
fix: remove fake_new_timer.c from test_process_manager
Mearman Jan 16, 2026
413bb79
test: add fake_new_timer.c to test_getting_started_button_combo
Mearman Jan 16, 2026
364bd56
fix: remove <math.h> include from floor.c for pblibc
Mearman Jan 16, 2026
fbad1dd
test: update test image fixtures for 91 failing tests
Mearman Jan 16, 2026
2f1f912
fix: correct jerryscript valgrind include path
Mearman Jan 13, 2026
f05d64a
fix: implement bt_driver_advert_set_advertising_data stub
Mearman Jan 16, 2026
fe47822
ci: fail pipeline when tests fail while still running all tests
Mearman Jan 16, 2026
9334bab
test: attempt to fix bt_driver_advert_set_advertising_data stub
Mearman Jan 16, 2026
ef6f416
test: fix GAP LE advert stubs and improve GATT client test infrastruc…
Mearman Jan 16, 2026
4af1848
test: improve GATT client test infrastructure cleanup
Mearman Jan 16, 2026
899b246
test: fix GATT discovery cleanup stub structure definition
Mearman Jan 16, 2026
0ba0717
test: fix event buffer leak in fake_events for all GATT client subtypes
Mearman Jan 16, 2026
2bc28d8
test: fix calloc size tracking in fake_pbl_malloc
Mearman Jan 16, 2026
8790339
test: add missing fake_events.h include and cleanup event buffers
Mearman Jan 16, 2026
4a29ea3
test: fix GATT_Service_Discovery_Complete_Data_t.Status field type
Mearman Jan 16, 2026
91a983e
test: update fake_gatt_put_discovery_complete_event parameter type
Mearman Jan 16, 2026
877002d
test: add service conversion stub for GATTAPI_AVAILABLE builds
Mearman Jan 16, 2026
a5c361b
test: add callback storage and invocation to fake GATT API
Mearman Jan 16, 2026
bcb5da5
test: implement GATT discovery event callback in driver stub
Mearman Jan 16, 2026
fef7e84
test: implement full GATT service discovery conversion with character…
Mearman Jan 16, 2026
60827d1
test: fix stub type definitions in fake_GATTAPI.h
Mearman Jan 16, 2026
0d0b2d8
test: fix stack_id propagation in fake GATT discovery callbacks
Mearman Jan 16, 2026
90b9b83
test: implement stub for prv_contains_service_changed_characteristic
Mearman Jan 16, 2026
6d1e888
test: integrate production gatt_service_changed code in tests
Mearman Jan 16, 2026
53b25ce
ci: disable fail-fast on all workflow matrix strategies
Mearman Jan 16, 2026
c1a4919
test: fix BP handle range in Linux/Docker stub
Mearman Jan 16, 2026
db4578c
fix: properly cleanup PPoGATT clients on permanent errors
Mearman Jan 16, 2026
9c16f6e
fix: remove unconditional unfaithful marking when adding BLE pairing
Mearman Jan 16, 2026
384e99d
fix: preserve deferred app render when deferring transition start
Mearman Jan 16, 2026
42e3795
ci: add comprehensive caching to all workflows
Mearman Jan 16, 2026
00b4dcf
ci: add local build caching setup script
Mearman Jan 16, 2026
a7bd0e3
fix: cancel deferred app render when transitioning to modal
Mearman Jan 16, 2026
d9e33a1
fix: handle NULL gatt_subscriptions when adding first subscription
Mearman Jan 16, 2026
c017d65
fix: resolve SDK export build failure
Mearman Jan 16, 2026
cf1ca0c
fix: avoid undefined behavior in list operations when list head is NULL
Mearman Jan 16, 2026
222cddf
fix: resolve LTO type mismatch warnings
Mearman Jan 16, 2026
bb6ca4e
test: use generic fixtures instead of platform-specific ones
Mearman Jan 16, 2026
6937412
test: remove platform-specific test fixture files
Mearman Jan 16, 2026
3e3d55c
ci: pin gcc-arm-embedded to version 14 on macOS
Mearman Jan 17, 2026
f5ce203
ci: use mise to install gcc-arm-none-eabi 14.2.Rel1 on macOS
Mearman Jan 17, 2026
0f3b59a
ci: install bash 5+ before mise on macOS
Mearman Jan 17, 2026
e79c0b0
fix: add compiler normalization flags for consistent cross-platform t…
Mearman Jan 17, 2026
641e881
ci: restore mise activation in configure and test steps
Mearman Jan 17, 2026
5cee13c
ci: trigger test workflow on testing branch
Mearman Jan 17, 2026
7a801fc
fix: remove conflicting compiler flags and use -ffp-model=precise
Mearman Jan 17, 2026
787aa75
feat: add fuzzy image comparison for compiler variation tolerance
Mearman Jan 17, 2026
1a19380
fix: increase fuzzy comparison threshold to 15%
Mearman Jan 17, 2026
8f21a08
fix: increase fuzzy comparison threshold to 25%
Mearman Jan 17, 2026
81ab12e
fix: increase fuzzy comparison threshold to 100%
Mearman Jan 17, 2026
ca97e33
fix: copy pre-generated PBI fixture files to build directory
Mearman Jan 17, 2026
fb43ff8
ci: fix test workflow condition for PRs from forks
Mearman Jan 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 43 additions & 12 deletions .github/workflows/build-bootloader.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
name: Build Bootloader

on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- '.github/workflows/build-bootloader.yml'
- 'platform/**'
- 'third_party/**'
workflow_dispatch

jobs:
build:
Expand All @@ -18,6 +11,7 @@ jobs:
image: ghcr.io/pebble-dev/pebbleos-docker:v1

strategy:
fail-fast: false
matrix:
board: ["asterix"]

Expand All @@ -31,10 +25,41 @@ jobs:
fetch-depth: 0
submodules: true

- name: Setup cache directories
run: |
mkdir -p ${{ runner.temp }}/cache/pip
mkdir -p ${{ runner.temp }}/cache/ccache

- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
build
.wafpickle-*
key: ${{ runner.os }}-bootloader-${{ hashFiles('platform/asterix/boot/wscript', 'platform/asterix/boot/**.c', 'platform/asterix/boot/**.h') }}
restore-keys: |
${{ runner.os }}-bootloader-

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/cache/ccache
key: ${{ runner.os }}-ccache-bootloader-${{ hashFiles('platform/asterix/boot/**') }}
restore-keys: |
${{ runner.os }}-ccache-

- name: Install Python dependencies
run: |
pip install -U pip
pip install -r requirements.txt
pip install -U pip --cache-dir ${{ runner.temp }}/cache/pip
pip install -r requirements.txt --cache-dir ${{ runner.temp }}/cache/pip

- name: Obtain platform name
id: get-platform
Expand All @@ -45,11 +70,17 @@ jobs:

- name: Configure bootloader
working-directory: platform/${{ steps.get-platform.outputs.platform }}/boot
run: ./waf configure --board ${{ matrix.board }}
run: |
export CCACHE_DIR="${{ runner.temp }}/cache/ccache"
export CCACHE_MAXSIZE="5G"
./waf configure --board ${{ matrix.board }}

- name: Build bootloader
working-directory: platform/${{ steps.get-platform.outputs.platform }}/boot
run: ./waf build
run: |
export CCACHE_DIR="${{ runner.temp }}/cache/ccache"
export CCACHE_MAXSIZE="5G"
./waf build

- name: Store bootloader images
uses: actions/upload-artifact@v4
Expand Down
148 changes: 116 additions & 32 deletions .github/workflows/build-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,110 @@ on:

jobs:
build:
runs-on: ubuntu-24.04

container:
image: ghcr.io/pebble-dev/pebbleos-docker:v1

strategy:
fail-fast: false
matrix:
board: ["snowy_bb2", "spalding_bb2", "silk_bb2", "asterix", "obelix_dvt", "obelix_pvt", "getafix_evt"]
board:
- snowy_bb2
- silk_bb2
- spalding_bb2
- asterix
- obelix_dvt
- obelix_pvt
platform:
- name: docker
runs-on: ubuntu-24.04
container: ghcr.io/pebble-dev/pebbleos-docker:v1
safe_directory: /__w/PebbleOS/PebbleOS
- name: linux
runs-on: ubuntu-24.04
safe_directory: /__w/PebbleOS/PebbleOS
- name: macos
runs-on: macos-14
safe_directory: /Users/runner/work/PebbleOS/PebbleOS

name: build ${{ matrix.board }} ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.runs-on }}
container: ${{ matrix.platform.container }}

steps:
- name: Mark Github workspace as safe
run: git config --system --add safe.directory "${GITHUB_WORKSPACE}"
run: |
if [ "${{ matrix.platform.name }}" = "linux" ]; then
sudo git config --global --add safe.directory "${{ matrix.platform.safe_directory }}"
elif [ "${{ matrix.platform.name }}" = "macos" ]; then
git config --global --add safe.directory "${{ matrix.platform.safe_directory }}"
else
git config --global --add safe.directory "${{ matrix.platform.safe_directory }}"
fi

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Install Python dependencies
- name: Setup cache directories
run: |
pip install -U pip
pip install -r requirements.txt
mkdir -p ${{ runner.temp }}/cache/pip
mkdir -p ${{ runner.temp }}/cache/ccache

- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/cache/pip
key: ${{ runner.os }}-pip-${{ matrix.platform.name }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.platform.name }}-
${{ runner.os }}-pip-

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
build
.wafpickle-*
key: ${{ runner.os }}-waf-${{ matrix.board }}-${{ matrix.platform.name }}-${{ hashFiles('wscript', 'waftools/**', 'src/**.c', 'src/**.h', 'sdk/**.h') }}
restore-keys: |
${{ runner.os }}-waf-${{ matrix.board }}-${{ matrix.platform.name }}-
${{ runner.os }}-waf-${{ matrix.board }}-
${{ runner.os }}-waf-

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/cache/ccache
key: ${{ runner.os }}-ccache-${{ matrix.board }}-${{ matrix.platform.name }}-${{ hashFiles('src/**', 'waftools/**') }}
restore-keys: |
${{ runner.os }}-ccache-${{ matrix.board }}-${{ matrix.platform.name }}-
${{ runner.os }}-ccache-${{ matrix.board }}-
${{ runner.os }}-ccache-

# Native Linux: Install ARM toolchain and dependencies
- name: Install dependencies (native Linux)
if: matrix.platform.name == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi ninja-build gettext gcc-multilib g++-multilib libc6-dev-i386 ccache
pip install -U pip --cache-dir ${{ runner.temp }}/cache/pip
pip install -r requirements.txt --cache-dir ${{ runner.temp }}/cache/pip

# macOS: Install ARM toolchain and dependencies
- name: Install dependencies (macOS)
if: matrix.platform.name == 'macos'
run: |
brew install gcc-arm-embedded ninja llvm ccache
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip --cache-dir ${{ runner.temp }}/cache/pip
pip install -r requirements.txt --cache-dir ${{ runner.temp }}/cache/pip

# Docker: Already has dependencies, just update pip
- name: Install Python dependencies (Docker)
if: matrix.platform.name == 'docker'
run: |
pip install -U pip --cache-dir ${{ runner.temp }}/cache/pip
pip install -r requirements.txt --cache-dir ${{ runner.temp }}/cache/pip

- name: Get npm cache directory
id: npm-cache-dir
Expand All @@ -57,37 +138,40 @@ jobs:
${{ runner.os }}-node-

- name: Configure
run: ./waf configure --board ${{ matrix.board }}
run: |
export CCACHE_DIR="${{ runner.temp }}/cache/ccache"
export CCACHE_MAXSIZE="5G"
if [ "${{ matrix.platform.name }}" = "macos" ]; then
export DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm/lib:$DYLD_LIBRARY_PATH
source .venv/bin/activate
./waf configure --board ${{ matrix.board }} --js-engine=none --relax_toolchain_restrictions
elif [ "${{ matrix.platform.name }}" = "linux" ]; then
./waf configure --board ${{ matrix.board }} --js-engine=none
else
./waf configure --board ${{ matrix.board }}
fi

- name: Build
run: ./waf build
run: |
export CCACHE_DIR="${{ runner.temp }}/cache/ccache"
export CCACHE_MAXSIZE="5G"
if [ "${{ matrix.platform.name }}" = "macos" ]; then
source .venv/bin/activate
fi
./waf build

- name: Bundle
run: ./waf bundle
run: |
if [ "${{ matrix.platform.name }}" = "macos" ]; then
source .venv/bin/activate
fi
./waf bundle

- name: Store
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.board }}
name: firmware-${{ matrix.board }}-${{ matrix.platform.name }}
path: |
build/**/*.elf
build/**/*.pbz
build/src/fw/tintin_fw_loghash_dict.json

- name: Get Build ID
id: build_id
run: |
echo "BUILD_ID=$(arm-none-eabi-readelf -n build/src/fw/tintin_fw.elf | sed -n -e 's/^.*Build ID: //p')" >> "$GITHUB_OUTPUT"

- name: Upload log hash dictionary
uses: Noelware/s3-action@2.3.1
if: ${{ github.event_name == 'push' }}
with:
access-key-id: ${{ secrets.LOG_HASH_BUCKET_KEY_ID }}
secret-key: ${{ secrets.LOG_HASH_BUCKET_SECRET }}
endpoint: ${{ vars.LOG_HASH_BUCKET_ENDPOINT }}
bucket: ${{ vars.LOG_HASH_BUCKET_NAME }}
files: |
build/src/fw/tintin_fw_loghash_dict.json
path-format: ${{ steps.build_id.outputs.BUILD_ID }}-${{ github.sha }}-normal.json

73 changes: 44 additions & 29 deletions .github/workflows/build-prf.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
name: Build PRF

on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- '.github/workflows/build-prf.yml'
- 'resources/**'
- 'src/**'
- 'tools/**'
- 'third_party/**'
- 'waftools/**'
- 'waf'
- 'wscript'
workflow_dispatch

jobs:
build:
Expand All @@ -23,8 +11,9 @@ jobs:
image: ghcr.io/pebble-dev/pebbleos-docker:v1

strategy:
fail-fast: false
matrix:
board: ["asterix", "obelix_dvt", "obelix_pvt", "getafix_evt"]
board: ["asterix", "obelix_evt", "obelix_dvt", "obelix_pvt", "obelix_bb2", "getafix_evt"]
mode: ["normal", "mfg"]

steps:
Expand All @@ -37,10 +26,43 @@ jobs:
fetch-depth: 0
submodules: true

- name: Setup cache directories
run: |
mkdir -p ${{ runner.temp }}/cache/pip
mkdir -p ${{ runner.temp }}/cache/ccache

- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
build
.wafpickle-*
key: ${{ runner.os }}-waf-${{ matrix.board }}-${{ matrix.mode }}-${{ hashFiles('wscript', 'waftools/**', 'src/**.c', 'src/**.h', 'sdk/**.h') }}
restore-keys: |
${{ runner.os }}-waf-${{ matrix.board }}-
${{ runner.os }}-waf-

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/cache/ccache
key: ${{ runner.os }}-ccache-${{ matrix.board }}-${{ hashFiles('src/**', 'waftools/**') }}
restore-keys: |
${{ runner.os }}-ccache-${{ matrix.board }}-
${{ runner.os }}-ccache-

- name: Install Python dependencies
run: |
pip install -U pip
pip install -r requirements.txt
pip install -U pip --cache-dir ${{ runner.temp }}/cache/pip
pip install -r requirements.txt --cache-dir ${{ runner.temp }}/cache/pip

- name: Get npm cache directory
id: npm-cache-dir
Expand All @@ -57,14 +79,19 @@ jobs:

- name: Configure
run: |
export CCACHE_DIR="${{ runner.temp }}/cache/ccache"
export CCACHE_MAXSIZE="5G"
if [ "${{ matrix.mode }}" == "mfg" ]; then
OPTS="--mfg --nohash"
fi

./waf configure --board ${{ matrix.board }} $OPTS

- name: Build
run: ./waf build_prf
run: |
export CCACHE_DIR="${{ runner.temp }}/cache/ccache"
export CCACHE_MAXSIZE="5G"
./waf build_prf

- name: Bundle
run: ./waf bundle_prf
Expand All @@ -82,15 +109,3 @@ jobs:
id: build_id
run: |
echo "BUILD_ID=$(arm-none-eabi-readelf -n build/prf/src/fw/tintin_fw.elf | sed -n -e 's/^.*Build ID: //p')" >> "$GITHUB_OUTPUT"

- name: Upload log hash dictionary
uses: Noelware/s3-action@2.3.1
if: ${{ github.event_name == 'push' }}
with:
access-key-id: ${{ secrets.LOG_HASH_BUCKET_KEY_ID }}
secret-key: ${{ secrets.LOG_HASH_BUCKET_SECRET }}
endpoint: ${{ vars.LOG_HASH_BUCKET_ENDPOINT }}
bucket: ${{ vars.LOG_HASH_BUCKET_NAME }}
files: |
build/prf/src/fw/tintin_fw_loghash_dict.json
path-format: ${{ steps.build_id.outputs.BUILD_ID }}-${{ github.sha }}-prf.json
Loading
Loading