mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-07 14:22:39 -05:00
73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: build-pr-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-changes:
|
|
if: github.repository == 'meshtastic/Meshtastic-Android' && !( github.head_ref == 'scheduled-updates' || github.head_ref == 'l10n_main' )
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
code_changed: ${{ steps.filter.outputs.code }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
code:
|
|
- '**/*.kt'
|
|
- '**/*.java'
|
|
- '**/*.xml'
|
|
- '**/*.kts'
|
|
- '**/*.properties'
|
|
- 'gradle/**'
|
|
- 'gradlew'
|
|
- 'gradlew.bat'
|
|
- '**/src/**'
|
|
- '.github/workflows/**'
|
|
|
|
android-check:
|
|
needs: check-changes
|
|
if: needs.check-changes.outputs.code_changed == 'true'
|
|
uses: ./.github/workflows/reusable-check.yml
|
|
with:
|
|
api_levels: '[35]' # Only test latest API on PRs for speed
|
|
flavors: '["google","fdroid"]'
|
|
secrets: inherit
|
|
|
|
skip-notice:
|
|
needs: check-changes
|
|
if: needs.check-changes.outputs.code_changed != 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Skip CI for non-code changes
|
|
run: echo "Skipping CI - no code changes detected (docs/config only)"
|
|
|
|
check-workflow-status:
|
|
name: Check Workflow Status
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- check-changes
|
|
- android-check
|
|
if: always()
|
|
steps:
|
|
- name: Check Workflow Status
|
|
run: |
|
|
if [[ "${{ needs.check-changes.outputs.code_changed }}" != "true" ]]; then
|
|
echo "No code changes - CI jobs skipped as expected"
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "${{ needs.android-check.result }}" == "failure" || "${{ needs.android-check.result }}" == "cancelled" ]]; then
|
|
echo "::error::Android Check failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo "All jobs passed successfully"
|