-
Notifications
You must be signed in to change notification settings - Fork 23
99 lines (99 loc) · 3.47 KB
/
bindings_flutter_test.yaml
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
name: test bindings_flutter
on:
push:
branches:
- main
pull_request:
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/bindings_flutter
jobs:
build_android:
runs-on: warp-macos-13-arm64-6x
defaults:
run:
working-directory: ./bindings_flutter
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android,i686-linux-android
- uses: Swatinem/rust-cache@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.8'
channel: 'stable'
- run: flutter pub get
- run: cargo install cargo-expand
- run: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.22
- run: flutter_rust_bridge_codegen generate
- run: scripts/build-android.sh
- uses: actions/upload-artifact@v3
with:
name: xmtp_bindings_flutter.jniLibs.tar.gz
path: bindings_flutter/platform-build/xmtp_bindings_flutter.jniLibs.tar.gz
retention-days: 1
build_linux:
runs-on: warp-ubuntu-latest-x64-4x
defaults:
run:
working-directory: ./bindings_flutter
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
# targets: aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu
targets: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.8'
channel: 'stable'
- uses: goto-bus-stop/setup-zig@v2
- run: flutter pub get
- run: cargo install cargo-expand
- run: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.22
- run: flutter_rust_bridge_codegen generate
- run: scripts/build-linux.sh
- run: cp target/x86_64-unknown-linux-gnu/release/libxmtp_bindings_flutter.so ./libxmtp_bindings_flutter.so
- run: dev/up
working-directory: ./
- run: flutter test
- uses: actions/upload-artifact@v3
with:
name: xmtp_bindings_flutter.linux.tar.gz
path: bindings_flutter/platform-build/xmtp_bindings_flutter.linux.tar.gz
retention-days: 1
build_apple:
runs-on: warp-macos-13-arm64-6x
defaults:
run:
working-directory: ./bindings_flutter
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-darwin,x86_64-apple-darwin
- uses: Swatinem/rust-cache@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.8'
channel: 'stable'
- run: flutter pub get
- run: cargo install cargo-expand
- run: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.22
- run: flutter_rust_bridge_codegen generate
- run: scripts/build-apple.sh
- uses: actions/upload-artifact@v3
with:
name: xmtp_bindings_flutter.xcframework.zip
path: bindings_flutter/platform-build/xmtp_bindings_flutter.xcframework.zip
retention-days: 1
- uses: actions/upload-artifact@v3
with:
name: libxmtp_bindings_flutter.dylib
path: bindings_flutter/platform-build/libxmtp_bindings_flutter.dylib
retention-days: 1