File tree 2 files changed +44
-5
lines changed
2 files changed +44
-5
lines changed Original file line number Diff line number Diff line change @@ -14,26 +14,65 @@ jobs:
14
14
build :
15
15
strategy :
16
16
matrix :
17
- os :
18
- - macOS-latest
19
- - ubuntu-latest
20
- - windows-latest
17
+ target :
18
+ - macos
19
+ - linux
20
+ - windows
21
+ - android
22
+ include :
23
+ - target : macos
24
+ os : macOS-latest
25
+ cbt : aarch64-apple-darwin
26
+ - target : linux
27
+ os : ubuntu-latest
28
+ cbt : x86_64-unknown-linux-gnu
29
+ - target : windows
30
+ os : windows-latest
31
+ cbt : x86_64-pc-windows-msvc
32
+ - target : android
33
+ os : ubuntu-latest
34
+ cbt : aarch64-linux-android
35
+
21
36
runs-on : ${{ matrix.os }}
22
37
38
+ env :
39
+ CARGO_BUILD_TARGET : ${{ matrix.cbt }}
40
+
23
41
steps :
24
42
- uses : actions/checkout@v2
25
43
- name : Install dependencies
26
44
if : ${{ runner.os == 'Linux' }}
27
45
run : |
28
46
sudo apt-get update
29
47
sudo apt-get install libdbus-1-dev
48
+ - uses : actions/setup-java@v2
49
+ if : ${{ matrix.target == 'android' }}
50
+ with :
51
+ distribution : ' zulu'
52
+ java-version : ' 17'
53
+ - name : Setup NDK
54
+ if : ${{ matrix.target == 'android' }}
55
+ uses : nttld/setup-ndk@v1
56
+ id : setup-ndk
57
+ with :
58
+ ndk-version : r25b
59
+ local-cache : true
60
+ - name : rust toolchain
61
+ if : ${{ matrix.target == 'android' }}
62
+ uses : actions-rs/toolchain@v1
63
+ with :
64
+ profile : minimal
65
+ target : aarch64-linux-android
66
+ toolchain : stable
67
+ override : true
30
68
- name : Check
31
69
run : cargo check --all --bins --examples
32
70
- name : Check without default features
33
71
run : cargo check --all --bins --examples --no-default-features
34
72
- name : Check with all features
35
73
run : cargo check --all --bins --examples --all-features
36
74
- name : Run tests
75
+ if : ${{ matrix.target != 'android' }}
37
76
run : cargo test --all
38
77
- name : Run clippy
39
78
uses : actions-rs/clippy-check@v1
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ dbus = "0.9.7"
41
41
bluez-async = " 0.7.2"
42
42
43
43
[target .'cfg(target_os = "android")' .dependencies ]
44
- jni = " 0.21.1 "
44
+ jni = " 0.19.0 "
45
45
once_cell = " 1.19.0"
46
46
jni-utils = " 0.1.1"
47
47
You can’t perform that action at this time.
0 commit comments