From 50968cad106aeed2d3db0b6a4abfac3a56806c0f Mon Sep 17 00:00:00 2001 From: Vishnu Sanal T Date: Sun, 28 Dec 2025 22:30:30 +0530 Subject: [PATCH] setup rust on the test_emulator job Signed-off-by: Vishnu Sanal T --- .github/workflows/android-main.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/android-main.yml b/.github/workflows/android-main.yml index ea0959f7ad..16f41e2f07 100644 --- a/.github/workflows/android-main.yml +++ b/.github/workflows/android-main.yml @@ -115,6 +115,39 @@ jobs: with: distribution: "temurin" java-version: 17 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Cache Rust dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + file_operations/target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Setup Rust for Android + run: | + cd file_operations + chmod +x setup_rust_android.sh + ./setup_rust_android.sh + - name: Verify Rust setup + run: | + cd file_operations + echo "🔍 Verifying Rust Android targets..." + rustup target list --installed | grep android || echo "No Android targets found" + echo "🔍 Verifying cargo configuration..." + if [ -f .cargo/config.toml ]; then + echo "✅ .cargo/config.toml exists" + else + echo "❌ .cargo/config.toml missing" + exit 1 + fi - name: Enable KVM run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules