Skip to content

Commit df9fe80

Browse files
committed
Fix emulator rust installation
1 parent a87d39d commit df9fe80

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/android-main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- 'master'
77
- 'release/*'
88
- 'hotfix/*'
9+
- 'test/*'
910

1011
concurrency:
1112
group: build-${{ github.event.pull_request.number || github.ref }}
@@ -131,6 +132,35 @@ jobs:
131132
~/.android/adb*
132133
~/.android/debug.keystore
133134
key: avd-${{ matrix.api-level }}
135+
- name: Cache Rust dependencies
136+
uses: actions/cache@v4
137+
with:
138+
path: |
139+
~/.cargo/bin/
140+
~/.cargo/registry/index/
141+
~/.cargo/registry/cache/
142+
~/.cargo/git/db/
143+
file_operations/target/
144+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
145+
restore-keys: |
146+
${{ runner.os }}-cargo-
147+
- name: Setup Rust for Android
148+
run: |
149+
cd file_operations
150+
chmod +x setup_rust_android.sh
151+
./setup_rust_android.sh
152+
- name: Verify Rust setup
153+
run: |
154+
cd file_operations
155+
echo "🔍 Verifying Rust Android targets..."
156+
rustup target list --installed | grep android || echo "No Android targets found"
157+
echo "🔍 Verifying cargo configuration..."
158+
if [ -f .cargo/config.toml ]; then
159+
echo "✅ .cargo/config.toml exists"
160+
else
161+
echo "❌ .cargo/config.toml missing"
162+
exit 1
163+
fi
134164
- name: create AVD and generate snapshot for caching
135165
if: steps.avd-cache.outputs.cache-hit != 'true'
136166
uses: reactivecircus/android-emulator-runner@v2

0 commit comments

Comments
 (0)