-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (82 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
89 lines (82 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
FLUTTER_VERSION: 3.47.2
jobs:
quality:
name: Analyze and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: flutter test
working-directory: example
android:
name: Android debug build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: flutter pub get
working-directory: example
- run: flutter build apk --debug --target-platform android-arm64
working-directory: example
- name: Verify API and ABI contract in APK
working-directory: example
run: |
apk=build/app/outputs/flutter-apk/app-debug.apk
apkanalyzer="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/apkanalyzer"
test -x "$apkanalyzer"
test "$("$apkanalyzer" manifest min-sdk "$apk")" = "29"
test "$(unzip -Z1 "$apk" | awk -F/ '/^lib\// {print $2}' | sort -u)" = "arm64-v8a"
macos:
name: macOS release build
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- run: flutter precache --macos
- run: flutter pub get
working-directory: example
- run: python3 tool/macos_run.py --mode release --build-only
working-directory: example
platform-contract:
name: Platform contract
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify declared platform hosts
run: |
test -d example/android
test -d example/macos
test ! -d example/web
test ! -d example/ios
test ! -d example/linux
test ! -d example/windows
grep -F 'minSdk = 29' example/android/app/build.gradle.kts
grep -F 'abiFilters += "arm64-v8a"' example/android/app/build.gradle.kts