Skip to content

Commit b331405

Browse files
committed
Fix flutter_rust_bridge hash mismatch in CI
1 parent 84d463f commit b331405

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/flutter-release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ jobs:
9999
steps:
100100
- uses: actions/checkout@v4
101101

102+
- name: Setup Flutter
103+
uses: subosito/flutter-action@v2
104+
with:
105+
flutter-version: ${{ env.FLUTTER_VERSION }}
106+
channel: stable
107+
102108
- name: Setup Rust
103109
uses: dtolnay/rust-toolchain@stable
104110
with:
@@ -111,11 +117,24 @@ jobs:
111117
ndk-version: r25c
112118
add-to-path: true
113119

120+
- name: Install LLVM/Clang
121+
run: sudo apt-get update && sudo apt-get install -y libclang-dev llvm-dev
122+
114123
- name: Cache Cargo
115124
uses: Swatinem/rust-cache@v2
116125
with:
117126
shared-key: rust-android-release-${{ matrix.target }}
118127

128+
- name: Install flutter_rust_bridge_codegen
129+
run: cargo install flutter_rust_bridge_codegen
130+
131+
- name: Get Flutter dependencies
132+
working-directory: packages/fula_client
133+
run: flutter pub get
134+
135+
- name: Generate Rust bindings (CRITICAL - must match Dart bindings)
136+
run: flutter_rust_bridge_codegen generate
137+
119138
- name: Configure linker for Android
120139
run: |
121140
mkdir -p .cargo
@@ -160,6 +179,12 @@ jobs:
160179
steps:
161180
- uses: actions/checkout@v4
162181

182+
- name: Setup Flutter
183+
uses: subosito/flutter-action@v2
184+
with:
185+
flutter-version: ${{ env.FLUTTER_VERSION }}
186+
channel: stable
187+
163188
- name: Setup Rust
164189
uses: dtolnay/rust-toolchain@stable
165190
with:
@@ -170,6 +195,16 @@ jobs:
170195
with:
171196
shared-key: rust-ios-release
172197

198+
- name: Install flutter_rust_bridge_codegen
199+
run: cargo install flutter_rust_bridge_codegen
200+
201+
- name: Get Flutter dependencies
202+
working-directory: packages/fula_client
203+
run: flutter pub get
204+
205+
- name: Generate Rust bindings (CRITICAL - must match Dart bindings)
206+
run: flutter_rust_bridge_codegen generate
207+
173208
- name: Build for iOS arm64
174209
run: cargo build -p fula-flutter --target aarch64-apple-ios --release
175210

0 commit comments

Comments
 (0)