|
27 | 27 | ndk-version: r28c |
28 | 28 | link-to-sdk: true |
29 | 29 | local-cache: true |
| 30 | + - name: Install Rust |
| 31 | + uses: dtolnay/rust-toolchain@stable |
| 32 | + with: |
| 33 | + toolchain: stable |
| 34 | + - name: Cache Rust dependencies |
| 35 | + uses: actions/cache@v4 |
| 36 | + with: |
| 37 | + path: | |
| 38 | + ~/.cargo/bin/ |
| 39 | + ~/.cargo/registry/index/ |
| 40 | + ~/.cargo/registry/cache/ |
| 41 | + ~/.cargo/git/db/ |
| 42 | + file_operations/target/ |
| 43 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 44 | + restore-keys: | |
| 45 | + ${{ runner.os }}-cargo- |
| 46 | + - name: Setup Rust for Android |
| 47 | + run: | |
| 48 | + cd file_operations |
| 49 | + chmod +x setup_rust_android.sh |
| 50 | + ./setup_rust_android.sh |
| 51 | + - name: Verify Rust setup |
| 52 | + run: | |
| 53 | + cd file_operations |
| 54 | + echo "🔍 Verifying Rust Android targets..." |
| 55 | + rustup target list --installed | grep android || echo "No Android targets found" |
| 56 | + echo "🔍 Verifying cargo configuration..." |
| 57 | + if [ -f .cargo/config.toml ]; then |
| 58 | + echo "✅ .cargo/config.toml exists" |
| 59 | + else |
| 60 | + echo "❌ .cargo/config.toml missing" |
| 61 | + exit 1 |
| 62 | + fi |
30 | 63 | - name: Check formatting using spotless |
31 | 64 | uses: gradle/actions/setup-gradle@v3 |
32 | 65 | with: |
|
42 | 75 | with: |
43 | 76 | distribution: "temurin" |
44 | 77 | java-version: 17 |
| 78 | + - name: Install Rust |
| 79 | + uses: dtolnay/rust-toolchain@stable |
| 80 | + with: |
| 81 | + toolchain: stable |
| 82 | + - name: Cache Rust dependencies |
| 83 | + uses: actions/cache@v4 |
| 84 | + with: |
| 85 | + path: | |
| 86 | + ~/.cargo/bin/ |
| 87 | + ~/.cargo/registry/index/ |
| 88 | + ~/.cargo/registry/cache/ |
| 89 | + ~/.cargo/git/db/ |
| 90 | + file_operations/target/ |
| 91 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 92 | + restore-keys: | |
| 93 | + ${{ runner.os }}-cargo- |
| 94 | + - name: Setup Rust for Android |
| 95 | + run: | |
| 96 | + cd file_operations |
| 97 | + chmod +x setup_rust_android.sh |
| 98 | + ./setup_rust_android.sh |
| 99 | + - name: Verify Rust setup |
| 100 | + run: | |
| 101 | + cd file_operations |
| 102 | + echo "🔍 Verifying Rust Android targets..." |
| 103 | + rustup target list --installed | grep android || echo "No Android targets found" |
| 104 | + echo "🔍 Verifying cargo configuration..." |
| 105 | + if [ -f .cargo/config.toml ]; then |
| 106 | + echo "✅ .cargo/config.toml exists" |
| 107 | + else |
| 108 | + echo "❌ .cargo/config.toml missing" |
| 109 | + exit 1 |
| 110 | + fi |
45 | 111 | - name: Build with Gradle |
46 | 112 | uses: gradle/actions/setup-gradle@v3 |
47 | 113 | with: |
|
0 commit comments