- New tools/check_versions.sh: verifies version.txt, version.h, SylDaVersions.kt match - release.yml: 'Verify version consistency' step after build, aborts release if mismatch - ci.yml: same check after debug APK build - scripts/release.sh: now runs full pipeline (pio run -> copy firmware -> gradle -> check) and refuses dirty working tree - Untrack version.h, SylDaVersions.kt, release/ — always regenerated fresh from version.txt Prevents the v1.1 bug where stale generated files caused version mismatch and infinite re-flash loop.
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
firmware:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build firmware
|
|
run: pio run
|
|
|
|
- name: Copy firmware to Android assets
|
|
run: bash tools/copy_firmware.sh
|
|
|
|
- name: Stage firmware for android job
|
|
run: |
|
|
rm -rf /tmp/ci-artifacts/firmware
|
|
mkdir -p /tmp/ci-artifacts/firmware
|
|
cp .pio/build/s3lite-server/firmware.bin /tmp/ci-artifacts/firmware/
|
|
cp .pio/build/s3lite-server/bootloader.bin /tmp/ci-artifacts/firmware/
|
|
cp .pio/build/s3lite-server/partitions.bin /tmp/ci-artifacts/firmware/
|
|
cp android/app/src/main/assets/firmware/boot_app0.bin /tmp/ci-artifacts/firmware/
|
|
|
|
android:
|
|
needs: firmware
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Restore firmware from firmware job
|
|
run: |
|
|
cp /tmp/ci-artifacts/firmware/boot_app0.bin android/app/src/main/assets/firmware/
|
|
cp /tmp/ci-artifacts/firmware/firmware.bin android/app/src/main/assets/firmware/
|
|
cp /tmp/ci-artifacts/firmware/bootloader.bin android/app/src/main/assets/firmware/
|
|
cp /tmp/ci-artifacts/firmware/partitions.bin android/app/src/main/assets/firmware/
|
|
|
|
- name: Build debug APK
|
|
working-directory: android
|
|
run: ./gradlew assembleDebug
|
|
env:
|
|
ANDROID_HOME: ${{ vars.ANDROID_HOME || '/home/linuxbrew/.linuxbrew/share/android-commandlinetools' }}
|
|
|
|
- name: Verify version consistency
|
|
run: bash tools/check_versions.sh
|
|
|
|
- name: Stage APK
|
|
run: |
|
|
mkdir -p /tmp/ci-artifacts
|
|
cp android/app/build/outputs/apk/debug/app-debug.apk /tmp/ci-artifacts/
|