-
Notifications
You must be signed in to change notification settings - Fork 7
120 lines (93 loc) · 2.69 KB
/
ci.yml
File metadata and controls
120 lines (93 loc) · 2.69 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: CI
on:
push:
branches: [main, "**"]
pull_request:
branches: [main]
jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: "3.10.0"
- name: Install lipo (macOS)
if: matrix.os == 'macos-latest'
run: |
which lipo || echo 'lipo available in Xcode toolchain'
- name: Generate bindings and native library
run: |
chmod +x scripts/generate_bindings.sh
./scripts/generate_bindings.sh
- name: Ensure generated bindings exist
run: test -f lib/bdk.dart
- name: Pub get
run: dart pub get
- name: Pub get (bdk_demo)
working-directory: bdk_demo
run: flutter pub get
- name: Format check
run: dart format --output=none --set-exit-if-changed lib test example bdk_demo/lib bdk_demo/test
- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings lib test example
- name: Analyze (bdk_demo)
working-directory: bdk_demo
run: flutter analyze
- name: Run tests
run: |
dart test
windows-smoke:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: "3.10.0"
- name: Pub get
run: dart pub get
- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings lib test example
- name: Run tests
run: dart test
android-smoke:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: "3.10.0"
- name: Pub get (bdk_demo)
working-directory: bdk_demo
run: flutter pub get
- name: Build Android debug APK (bdk_demo)
working-directory: bdk_demo
run: flutter build apk --debug --target-platform android-arm64