-
Notifications
You must be signed in to change notification settings - Fork 9
81 lines (62 loc) · 2.1 KB
/
ci.yml
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
name: CI
on:
push:
#branches: [master]
paths-ignore:
- '**/README.md'
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build_and_test:
name: OuiSync Flutter App - Android
runs-on: ubuntu-latest
steps:
- name: Installing llvm
run: sudo apt-get install libclang-dev
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Adding Android Platform target
run: rustup target add x86_64-linux-android # armv7-linux-androideabi aarch64-linux-android i686-linux-android
- name: Install dependencies
run: sudo apt-get install libfuse-dev
- name: Generate ./ouisync-plugin/ouisync/target/bindings.h
run: |
cd ouisync-plugin/ouisync
cargo run --bin bindgen
- name: Setting up the Android NDK environment
uses: nttld/setup-ndk@v1
with:
ndk-version: r25c
- name: Set the ABI filter for x86_64
run: echo "ndk.abiFilters=x86_64" >> android/local.properties
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.1'
- name: Flutter doctor
run: flutter doctor -v
- name: Getting Flutter packages (App)
run: flutter pub get
- name: Get Flutter packages (Plugin)
run: |
cd ouisync-plugin
flutter pub get
- name: Generate the Dart bindings for the OuiSync plugin (from the Rust FFI bindings for OuiSync library)
run: |
cd ouisync-plugin
flutter pub run ffigen
- name: Analyze
run: flutter analyze
- name: Build OuiSync library for tests
run: |
cd ouisync-plugin/ouisync
cargo build --release -p ouisync-ffi
- name: Run tests
run: OUISYNC_LIB=`pwd`/ouisync-plugin/ouisync/target/release/libouisync_ffi.so flutter test
- name: Building APK (android-x64)
run: flutter build apk --flavor vanilla -t lib/main_vanilla.dart --target-platform android-x64