From 54aa6dee971abf3fe28db2710ee4ab1d35106a49 Mon Sep 17 00:00:00 2001 From: babin Date: Sat, 19 Sep 2026 15:18:24 +0300 Subject: [PATCH] ci: use available Android tools and verify Windows CLI artifact --- .github/workflows/android.yml | 3 +++ .github/workflows/ci.yml | 8 ++++++++ src/mtproto.rs | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 03e3503..c823587 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -25,6 +25,9 @@ jobs: distribution: temurin java-version: 17 - uses: android-actions/setup-android@v3 + with: + packages: platform-tools + log-accepted-android-sdk-licenses: false - name: Install Android SDK and NDK run: | sdkmanager "platforms;android-36" "build-tools;36.0.0" "ndk;28.0.13004108" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e17a4d8..72744f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,14 @@ jobs: run: cargo clippy --locked --no-default-features --features cli --all-targets -- -D warnings - name: Test CLI and core run: cargo test --locked --no-default-features --features cli --lib --bins + - name: Build CLI for manual Windows verification + run: cargo build --locked --no-default-features --features cli --bin tglock-cli + - uses: actions/upload-artifact@v4 + with: + name: tglock-cli-windows-debug + path: target/debug/tglock-cli.exe + if-no-files-found: error + retention-days: 14 rust: name: Rust checks diff --git a/src/mtproto.rs b/src/mtproto.rs index c2857e4..f5b626c 100644 --- a/src/mtproto.rs +++ b/src/mtproto.rs @@ -702,7 +702,9 @@ mod tests { // Fixed wire bytes avoid a symmetric mistake in the test peer helpers. fn bytes(hex: &str) -> Vec { hex.as_bytes() - .chunks_exact(2) + .as_chunks::<2>() + .0 + .iter() .map(|pair| u8::from_str_radix(std::str::from_utf8(pair).unwrap(), 16).unwrap()) .collect() }