Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7809ede
Created CI_CD.md
RSainarayan Apr 28, 2026
0827197
Add GitHub Actions CI/CD pipeline for automated builds
Tharun-deakin Apr 28, 2026
156b651
Add GitHub Actions CI/CD pipeline for automated builds (#48)
Tharun-deakin Apr 28, 2026
ddb8cf7
Fix: Update device IDs to correct SDK format
Tharun-deakin Apr 28, 2026
44d6407
Fix: Resolve API level compatibility and device list
Tharun-deakin Apr 28, 2026
2579046
Feature/build (#49)
Tharun-deakin Apr 28, 2026
eadba8d
Fix device download and add fr235
Tharun-deakin Apr 28, 2026
8342ac6
Fix device download and add fr235 (#50)
Tharun-deakin Apr 28, 2026
14ebe8f
Fix: Remove failing device definitions step and unnecessary triggers
Tharun-deakin Apr 29, 2026
5e569a9
Fix: Remove failing device definitions step and unnecessary triggers …
Tharun-deakin Apr 29, 2026
9d06945
Test: Build only venu2 to diagnose device ID issue
Tharun-deakin Apr 29, 2026
4c55641
Test: Build only venu2 to diagnose device ID issue (#53)
Tharun-deakin Apr 29, 2026
4cd587e
Build
RSainarayan May 1, 2026
be9f4e6
Build Fr 165 and 165m (#55)
RSainarayan May 1, 2026
ae7c279
Add fr245m support for PRG build on feature/fr245m-prg
Tharun-deakin May 4, 2026
c3537c7
Add fr245m support for PRG build on feature/fr245m-prg (#56)
RSainarayan May 4, 2026
0189147
Update manifest.xml
RSainarayan May 4, 2026
0e65250
Feature/BuildV1.0.2_Fr245m (#57)
RSainarayan May 4, 2026
c6c7cb3
add workflow
layanthapramudith2222-beep May 9, 2026
7769315
add
layanthapramudith2222-beep May 9, 2026
500a118
fix errors
layanthapramudith2222-beep May 9, 2026
097d9c7
add ci cd for develop branch
layanthapramudith2222-beep May 9, 2026
0decb4e
bug fix
layanthapramudith2222-beep May 9, 2026
4415648
add
layanthapramudith2222-beep May 9, 2026
c19c9a9
fix sdk
layanthapramudith2222-beep May 9, 2026
090a11f
add
layanthapramudith2222-beep May 9, 2026
ef11b1d
update
layanthapramudith2222-beep May 9, 2026
f70a2b4
add
layanthapramudith2222-beep May 12, 2026
629159e
add
layanthapramudith2222-beep May 12, 2026
831bcba
Merge pull request #29 from jackb1738/reset-settings-branch
jackb1738 May 16, 2026
0906927
Revert "Reset settings branch"
jackb1738 May 16, 2026
3e01fc3
Merge pull request #30 from jackb1738/revert-29-reset-settings-branch
jackb1738 May 16, 2026
c5ef22a
fixed reset settings
jackb1738 May 16, 2026
474a5f0
Merge pull request #31 from jackb1738/fixedresetsettings
jackb1738 May 16, 2026
4eeab12
Fix errors
layanthapramudith2222-beep May 16, 2026
54a8e26
Improve device recognition test to handle multiple devices and provid…
layanthapramudith2222-beep May 16, 2026
69abbbf
Add SDK structure display to CI workflows for better debugging
layanthapramudith2222-beep May 16, 2026
f0aca61
Enhance SDK structure display in CI workflows for improved visibility…
layanthapramudith2222-beep May 16, 2026
1eb906f
Enhance SDK download process with authorization and progress feedback
layanthapramudith2222-beep May 16, 2026
de669d7
Enhance SDK download process to support both gzip/tar and zip formats
layanthapramudith2222-beep May 16, 2026
ddff587
Enhance SDK installation process to support both gzip/tar and zip for…
layanthapramudith2222-beep May 16, 2026
ce5f30e
Enhance SDK installation process to support both gzip/tar and zip for…
layanthapramudith2222-beep May 16, 2026
9ec2564
Enhance SDK download process in CI workflows to support gzip/tar and …
layanthapramudith2222-beep May 16, 2026
fda06bc
Fix CI: download per-device compiler.json profiles from Garmin Connec…
layanthapramudith2222-beep May 16, 2026
b3e467d
Enhance device profile download process in CI workflows with error ha…
layanthapramudith2222-beep May 16, 2026
e2e0cd3
Add vibration mode indicator to main view
SuhathK May 16, 2026
84e98e1
Clean up start recording confirmation screen UI
SuhathK May 16, 2026
b53dbff
Merge pull request #32 from jackb1738/feature/vibration-mode-indicator
jackb1738 May 17, 2026
ce4f6cd
Merge pull request #33 from jackb1738/feature/start-confirm-ui-cleanup
jackb1738 May 17, 2026
fa2a242
Add ML notebook, dataset, and Power BI dashboard
JESWINJL May 17, 2026
098c685
Created CI_CD.md (#67)
RSainarayan May 18, 2026
485907d
Resolved conflict by keeping Redback develop version of manifest.xml
jackb1738 May 18, 2026
a0e8ced
Updated app version with changes (#69)
jackb1738 May 18, 2026
a585793
Create Build_Download_guide.md
RSainarayan May 24, 2026
09e461b
Feature/ml powerbi dashboard (#72)
RSainarayan May 24, 2026
c1b2ee6
Create Build_Download_guide.md (#73)
RSainarayan May 24, 2026
7a3634e
Add Garmin watch CICD documentation
Tharun-deakin May 24, 2026
7186378
Add Garmin watch CICD documentation (#74)
Tharun-deakin May 24, 2026
34e8bae
Addded docker documentation
Tharun-deakin May 24, 2026
cfb9a8f
Addded docker documentation (#76)
Tharun-deakin May 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
380 changes: 380 additions & 0 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,380 @@
name: CI — Develop

on:
push:
branches: [develop]
pull_request:
branches: [develop]
workflow_dispatch:
inputs:
debug:
description: 'Enable verbose build output'
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# ── 1. SDK validation ────────────────────────────────────────────────────────
validate-sdk:
name: Validate SDK
runs-on: ubuntu-latest
outputs:
sdk-version: ${{ steps.version.outputs.value }}

steps:
- name: Restore SDK cache
id: cache
uses: actions/cache@v4
with:
path: ~/connectiq-sdk
key: connectiq-sdk-${{ vars.CIQ_SDK_VERSION }}

- name: Install SDK
if: steps.cache.outputs.cache-hit != 'true'
env:
SDK_URL: ${{ secrets.CIQ_SDK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -z "$SDK_URL" ]; then
echo "::error title=Missing secret::CIQ_SDK_URL is not configured."
exit 1
fi
echo "Downloading SDK…"
wget -q \
--header="Authorization: token $GITHUB_TOKEN" \
--header="Accept: application/octet-stream" \
"$SDK_URL" -O /tmp/sdk.archive
echo "Download complete ($(du -sh /tmp/sdk.archive | cut -f1))"
mkdir -p "$HOME/connectiq-sdk"
if file /tmp/sdk.archive | grep -q "gzip\|tar"; then
tar -xzf /tmp/sdk.archive -C "$HOME/connectiq-sdk" --strip-components=1
else
unzip -q /tmp/sdk.archive -d "$HOME/connectiq-sdk"
fi

# If we got the SDK Manager (or a partial SDK missing device defs), use it to complete the install
if find "$HOME/connectiq-sdk" -name "sdkmanager" -type f | grep -q . && \
! find "$HOME/connectiq-sdk" -name "devices" -type d | grep -q .; then

echo "SDK Manager detected — using it to download SDK ${{ vars.CIQ_SDK_VERSION }}..."
SDKMGR=$(find "$HOME/connectiq-sdk" -name "sdkmanager" -type f | head -1)
chmod +x "$SDKMGR"

# SDK Manager installs to ~/.Garmin/ConnectIQ/Sdks/
mkdir -p "$HOME/.Garmin/ConnectIQ/Sdks"

# Run headless install
"$SDKMGR" --headless 2>&1 &
SDKMGR_PID=$!
sleep 5
kill $SDKMGR_PID 2>/dev/null || true

# Check where the SDK was installed
SDK_INSTALL=$(find "$HOME/.Garmin/ConnectIQ/Sdks" -name "monkeyc" -type f 2>/dev/null | head -1 | xargs -I{} dirname {} | xargs -I{} dirname {})

if [ -n "$SDK_INSTALL" ]; then
echo "SDK found at $SDK_INSTALL — linking to connectiq-sdk/"
cp -r "$SDK_INSTALL/"* "$HOME/connectiq-sdk/"
else
echo "::error::SDK Manager headless install did not produce the SDK."
echo "::error::You need to upload the actual SDK zip (not the SDK Manager)."
echo "::error::On your local machine: run SDK Manager → install SDK 9.1.0 → zip the folder at ~/.Garmin/ConnectIQ/Sdks/connectiq-sdk-lin-9.1.0-XXXX/ → upload that zip to GitHub Releases."
exit 1
fi
fi

- name: Add SDK to PATH
run: |
MONKEYC=$(find "$HOME/connectiq-sdk" -name "monkeyc" -type f | head -1)
if [ -z "$MONKEYC" ]; then
echo "::error::monkeyc not found in $HOME/connectiq-sdk"
echo "=== SDK contents ==="
find "$HOME/connectiq-sdk" -maxdepth 4 | head -40
exit 1
fi
chmod +x "$MONKEYC"
echo "$(dirname "$MONKEYC")" >> $GITHUB_PATH

- name: Install device profiles
env:
DEVICES_URL: ${{ secrets.CIQ_DEVICES_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -z "$DEVICES_URL" ]; then
echo "::error::CIQ_DEVICES_URL is not configured."
exit 1
fi
mkdir -p "$HOME/.Garmin/ConnectIQ"
echo "Downloading device profiles…"
HTTP_CODE=$(wget \
--server-response \
--header="Authorization: token $GITHUB_TOKEN" \
--header="Accept: application/octet-stream" \
"$DEVICES_URL" -O /tmp/devices.tar.gz 2>&1 \
| awk '/^ HTTP/{print $2}' | tail -1)
echo "HTTP status: ${HTTP_CODE}"
if [ "${HTTP_CODE}" != "200" ]; then
echo "::error::Device profile download failed (HTTP ${HTTP_CODE}). Check CIQ_DEVICES_URL secret."
echo "First 200 bytes of response:"
head -c 200 /tmp/devices.tar.gz | cat -v
exit 1
fi
if ! file /tmp/devices.tar.gz | grep -qE "gzip|tar"; then
echo "::error::Downloaded file is not a valid tar.gz:"
file /tmp/devices.tar.gz
exit 1
fi
tar -xzf /tmp/devices.tar.gz -C "$HOME/.Garmin/ConnectIQ"
echo "Device profiles installed: $(ls "$HOME/.Garmin/ConnectIQ/Devices/" | wc -l) devices"

- name: Read SDK version
id: version
run: |
VER=$(monkeyc --version 2>&1 | grep -oP '\d+\.\d+\.\d+' | head -1)
echo "value=${VER}" >> $GITHUB_OUTPUT
echo "Connect IQ SDK: ${VER}"

- name: Show SDK structure
run: |
SDK_ROOT=$(find "$HOME/connectiq-sdk" -name "monkeyc" -type f | head -1 | xargs -I{} dirname {} | xargs -I{} dirname {})
echo "=== SDK root ==="
ls "$SDK_ROOT"
echo "=== share/ contents ==="
if [ -d "$SDK_ROOT/share" ]; then ls "$SDK_ROOT/share"; else echo "(no share/ dir)"; fi
echo "=== share/devices/ contents (SDK 9.x device specs) ==="
if [ -d "$SDK_ROOT/share/devices" ]; then ls "$SDK_ROOT/share/devices" | head -20; else echo "(no share/devices/ dir)"; fi
echo "=== file type of monkeyc binary ==="
MONKEYC=$(find "$HOME/connectiq-sdk" -name "monkeyc" -type f | head -1)
file "$MONKEYC"
echo "=== monkeyc script (first 20 lines) ==="
head -20 "$MONKEYC"

- name: Verify device support
run: |
SDK_ROOT=$(find "$HOME/connectiq-sdk" -name "monkeyc" -type f | head -1 | xargs -I{} dirname {} | xargs -I{} dirname {})
# SDK 7.x and earlier: devices/ at root
# SDK 8.x/9.x: devices/ moved to share/devices/
# Fallback: resources/device-reference/ (UI reference only, not compiler specs)
DEVICES_DIR=$(find "$SDK_ROOT" -maxdepth 2 -name "devices" -type d | head -1)
DEVICE_REF=$(find "$SDK_ROOT" -type d -name "device-reference" | head -1)
DEVICES_XML=$(find "$SDK_ROOT" -name "devices.xml" -type f | head -1)
CHECK_DIR="${DEVICES_DIR:-$DEVICE_REF}"

if [ -n "$CHECK_DIR" ]; then
REQUIRED=(fenix7 fenix7pro fenix7s fenix7x fr165 fr165m fr245 fr245m fr255 fr255m fr255s fr255sm fr265 fr265s fr955 vivoactive5)
MISSING=()
for d in "${REQUIRED[@]}"; do
[[ ! -d "$CHECK_DIR/$d" ]] && MISSING+=("$d")
done
if [[ ${#MISSING[@]} -gt 0 ]]; then
echo "::error title=SDK too old::SDK ${{ steps.version.outputs.value }} does not support: ${MISSING[*]}"
echo "::error::Update CIQ_SDK_URL to Connect IQ SDK 9.1.0."
exit 1
fi
echo "All 16 devices confirmed in SDK ${{ steps.version.outputs.value }} ✓"
elif [ -n "$DEVICES_XML" ]; then
echo "::error title=SDK too old::SDK uses old devices.xml format — version ${{ steps.version.outputs.value }} is too old."
echo "::error::Update CIQ_SDK_URL to Connect IQ SDK 9.1.0."
exit 1
else
echo "::error::No device definitions found. SDK extraction may have failed."
find "$HOME/connectiq-sdk" -type d -maxdepth 4
exit 1
fi

- name: Test device recognition
run: |
FAILED=()
for PROBE in fenix7 fr265 vivoactive5; do
RESULT=$(monkeyc -d "$PROBE" -f /nonexistent.jungle 2>&1 || true)
if echo "$RESULT" | grep -qi "invalid device"; then
FAILED+=("$PROBE")
fi
done
if [[ ${#FAILED[@]} -gt 0 ]]; then
echo "::error::monkeyc does not recognize: ${FAILED[*]}"
echo "::error::The SDK binary is too old. Update CIQ_SDK_URL to Connect IQ SDK 9.1.0"
echo "::error::and bump CIQ_SDK_VERSION to bust the cache."
exit 1
fi
echo "Device recognition test passed ✓"

# ── 2. Parallel builds ───────────────────────────────────────────────────────
build:
name: Build / ${{ matrix.device }}
runs-on: ubuntu-latest
needs: validate-sdk
strategy:
fail-fast: false
matrix:
device:
- fenix7
- fenix7pro
- fenix7s
- fenix7x
- fr165
- fr165m
- fr245
- fr245m
- fr255
- fr255m
- fr255s
- fr255sm
- fr265
- fr265s
- fr955
- vivoactive5

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Restore SDK cache
id: cache
uses: actions/cache@v4
with:
path: ~/connectiq-sdk
key: connectiq-sdk-${{ vars.CIQ_SDK_VERSION }}

- name: Install SDK (cache miss fallback)
if: steps.cache.outputs.cache-hit != 'true'
env:
SDK_URL: ${{ secrets.CIQ_SDK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q \
--header="Authorization: token $GITHUB_TOKEN" \
--header="Accept: application/octet-stream" \
"$SDK_URL" -O /tmp/sdk.archive
mkdir -p "$HOME/connectiq-sdk"
if file /tmp/sdk.archive | grep -qE "gzip|tar"; then
tar -xzf /tmp/sdk.archive -C "$HOME/connectiq-sdk" --strip-components=1
else
unzip -q /tmp/sdk.archive -d "$HOME/connectiq-sdk"
fi

- name: Add SDK to PATH
run: |
MONKEYC=$(find "$HOME/connectiq-sdk" -name "monkeyc" -type f | head -1)
if [ -z "$MONKEYC" ]; then
echo "::error::monkeyc not found — SDK cache miss and fallback install may have failed."
exit 1
fi
chmod +x "$MONKEYC"
echo "MONKEYC_PATH=$MONKEYC" >> $GITHUB_ENV
echo "$(dirname "$MONKEYC")" >> $GITHUB_PATH

- name: Install device profiles
env:
DEVICES_URL: ${{ secrets.CIQ_DEVICES_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -z "$DEVICES_URL" ]; then
echo "::error::CIQ_DEVICES_URL is not configured."
exit 1
fi
mkdir -p "$HOME/.Garmin/ConnectIQ"
echo "Downloading device profiles…"
HTTP_CODE=$(wget \
--server-response \
--header="Authorization: token $GITHUB_TOKEN" \
--header="Accept: application/octet-stream" \
"$DEVICES_URL" -O /tmp/devices.tar.gz 2>&1 \
| awk '/^ HTTP/{print $2}' | tail -1)
echo "HTTP status: ${HTTP_CODE}"
if [ "${HTTP_CODE}" != "200" ]; then
echo "::error::Device profile download failed (HTTP ${HTTP_CODE}). Check CIQ_DEVICES_URL secret."
echo "First 200 bytes of response:"
head -c 200 /tmp/devices.tar.gz | cat -v
exit 1
fi
if ! file /tmp/devices.tar.gz | grep -qE "gzip|tar"; then
echo "::error::Downloaded file is not a valid tar.gz:"
file /tmp/devices.tar.gz
exit 1
fi
tar -xzf /tmp/devices.tar.gz -C "$HOME/.Garmin/ConnectIQ"
echo "Device profiles installed: $(ls "$HOME/.Garmin/ConnectIQ/Devices/" | wc -l) devices"

- name: Diagnose monkeyc
run: |
echo "=== monkeyc location ==="
which monkeyc || echo "monkeyc not in PATH"
echo "=== java version ==="
java -version 2>&1 || echo "java not found"
echo "=== SDK structure ==="
SDK_ROOT=$(dirname "$(which monkeyc)")
ls "$SDK_ROOT"
echo "=== device recognition test ==="
monkeyc -d "${{ matrix.device }}" -f /nonexistent.jungle 2>&1 || true

- name: Write developer key
env:
KEY_B64: ${{ secrets.DEVELOPER_KEY_B64 }}
run: |
if [ -z "$KEY_B64" ]; then
echo "::error::DEVELOPER_KEY_B64 is not configured."
exit 1
fi
echo "$KEY_B64" | base64 --decode > developer_key.der

- name: Compile
id: compile
run: |
mkdir -p bin
EXTRA_FLAGS=""
[[ "${{ inputs.debug }}" == "true" ]] && EXTRA_FLAGS="-g"
monkeyc \
-o "bin/garminsmartwatch_${{ matrix.device }}.prg" \
-f monkey.jungle \
-y developer_key.der \
-d "${{ matrix.device }}" \
--release \
$EXTRA_FLAGS
SIZE=$(stat -c%s "bin/garminsmartwatch_${{ matrix.device }}.prg")
echo "size=${SIZE}" >> $GITHUB_OUTPUT
echo "garminsmartwatch_${{ matrix.device }}.prg — ${SIZE} bytes ✓"

- name: Upload artifact
if: steps.compile.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.device }}-${{ github.sha }}
path: bin/garminsmartwatch_${{ matrix.device }}.prg
retention-days: 7

# ── 3. Report ────────────────────────────────────────────────────────────────
report:
name: Build Report
runs-on: ubuntu-latest
needs: [validate-sdk, build]
if: always()

steps:
- name: Write job summary
env:
BUILD_RESULT: ${{ needs.build.result }}
SDK_VERSION: ${{ needs.validate-sdk.outputs.sdk-version }}
run: |
[[ "$BUILD_RESULT" == "success" ]] && ICON="✅" || ICON="❌"
cat >> $GITHUB_STEP_SUMMARY << SUMMARY
# ${ICON} Build Report — Develop

| | |
|---|---|
| **Branch** | \`${{ github.ref_name }}\` |
| **Commit** | [\`${GITHUB_SHA:0:7}\`](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}) |
| **SDK version** | \`${SDK_VERSION}\` |
| **Trigger** | \`${{ github.event_name }}\` |
| **Actor** | @${{ github.actor }} |
| **Overall status** | **${BUILD_RESULT}** |

Artifacts retained for **7 days**.
SUMMARY

- name: Fail if builds failed
if: needs.build.result != 'success'
run: exit 1
Loading
Loading