-
-
Notifications
You must be signed in to change notification settings - Fork 21
115 lines (106 loc) · 3.15 KB
/
check-native.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
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
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
name: Native
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clippy:
runs-on: ubuntu-latest
name: Clippy ${{ matrix.name }}
strategy:
matrix:
include:
- name: Core
package: acter-core
clippy_extras: --tests
- name: SDK
package: acter
needs_flutter: true
clippy_extras: --tests
- name: file-event-cache
package: matrix-sdk-store-file-event-cache
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- uses: subosito/flutter-action@v2
if: ${{matrix.needs_flutter}}
with:
flutter-version: '3.24'
channel: 'stable'
- name: Run Clippy
run: cargo clippy -p ${{matrix.package}} ${{matrix.clippy_extras}} -- -D warnings
test:
runs-on: ubuntu-latest
name: Test ${{ matrix.name }}
strategy:
matrix:
include:
- name: Core
package: acter-core
clippy_extras: --tests
- name: file-event-cache
package: matrix-sdk-store-file-event-cache
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: llvm-tools-preview
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Test
run: cargo llvm-cov --lcov --output-path lcov.info nextest -p ${{matrix.package}}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4
with:
files: lcov.info
flags: unittest
name: rust-unit-tests
token: ${{ secrets.CODECOV_TOKEN }}
release:
runs-on: ubuntu-latest
name: Release Build ${{ matrix.name }}
strategy:
matrix:
include:
- name: SDK
package: acter
needs_flutter: true
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: subosito/flutter-action@v2
if: ${{matrix.needs_flutter}}
with:
flutter-version: '3.24'
channel: 'stable'
- name: Release Build
run: cargo build -p ${{matrix.package}} --release
ffigen:
name: FFI-Gen up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.24'
channel: 'stable'
- name: Install supported rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-make
uses: davidB/rust-cargo-make@v1
- name: "Build FFI interface"
run: cargo make ffigen
- name: "Check file is no different"
run: git diff --exit-code packages/rust_sdk/lib/acter_flutter_sdk_ffi.dart