diff --git a/.github/docker/ci/Dockerfile b/.github/docker/ci/Dockerfile index a503918..bfa5872 100644 --- a/.github/docker/ci/Dockerfile +++ b/.github/docker/ci/Dockerfile @@ -50,7 +50,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- -y --default-toolchain stable --profile minimal --no-modify-path && \ - rustup target add aarch64-linux-android && \ + rustup target add aarch64-linux-android x86_64-unknown-linux-gnu && \ rustup component add rustfmt clippy && \ cargo install cargo-ndk --locked && \ chmod -R a+w /usr/local/rustup /usr/local/cargo diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fc35a4..3d264a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,11 @@ jobs: # Kotlin - name: ktlint run: ktlint "lsposed/**/*.kt" + # Gobley's cargo plugin enumerates Kotlin targets at gradle configure + # time and queries rustup for each, including the JVM host target. + # Without this target installed gradle dies with a NullPointerException. + - name: Add Linux x64 Rust target + run: rustup target add x86_64-unknown-linux-gnu - name: Android lint run: cd lsposed && ./gradlew --no-daemon :app:lint - name: Kotlin unit tests @@ -201,6 +206,12 @@ jobs: storeFile=$KEYSTORE_PATH EOF + # Gobley's cargo plugin enumerates Kotlin targets at gradle configure + # time and queries rustup for each, including the JVM host target. + # Without this target installed gradle dies with a NullPointerException. + - name: Add Linux x64 Rust target + run: rustup target add x86_64-unknown-linux-gnu + - name: Build APK run: | cd "$GITHUB_WORKSPACE/lsposed" && ./gradlew --no-daemon assembleRelease