mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-04-28 06:31:27 +00:00
ci: install x86_64-unknown-linux-gnu rust target for lsposed jobs
Gobley's cargo plugin enumerates Kotlin targets at gradle configure time and queries rustup for each one — including the JVM host target, even though we never build for it (`androidUnitTest = false` skips wiring the JVM cargo build into Android unit tests, but the build entry is still created at configure time). Without `x86_64-unknown-linux-gnu` installed, that lookup returns null and `:app:lint` / `assembleRelease` die with a bare `NullPointerException` during project configuration. Add the target as a workflow step in the lint and lsposed jobs so this PR's CI passes immediately, and bake it into the CI Dockerfile so subsequent image rebuilds carry it.
This commit is contained in:
parent
429b265df0
commit
33fa5574c3
2 changed files with 12 additions and 1 deletions
2
.github/docker/ci/Dockerfile
vendored
2
.github/docker/ci/Dockerfile
vendored
|
|
@ -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
|
||||
|
|
|
|||
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue