Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Commit

Permalink
Remove Windows NDK symlink and run apk check + build in separate step…
Browse files Browse the repository at this point in the history
…s (#118)

* ci: Separate apk check and build steps

An obscure one-line `apk build` failure got shadowed by a much larger
deprecation warning shown by `cargo check` right above, deemed
irrelevant. Separating these steps will make it clear when the issue is
code-related (ndk, ndk-glue) or build-related (ndk-build, cargo-apk,
cargo-subcommand).

* ci: Remove Windows NDK symlink; GH images now include space-less NDK

In [1] this hack was introduced because GH Actions virtual-environments
installed the SDK in `Program Files` which includes a space, but this is
not supported by the NDK. Now that the issue has been addressed [2] and
the images deployed this workaround can be removed again.

[1]: rust-mobile/ndk#92
[2]: actions/runner-images#2343
  • Loading branch information
MarijnS95 authored Jan 28, 2021
1 parent e25ffdb commit 2e103a5
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,11 @@ jobs:
run:
cargo install --path cargo-apk

- if: runner.os == 'Windows'
name: Create symlink to Android SDK/NDK without spaces
run: |
$oldAndroidPath = $env:ANDROID_HOME
$sdk_root = "C:\Android"
New-Item -Path $sdk_root -ItemType SymbolicLink -Value $oldAndroidPath
echo "ANDROID_SDK_ROOT=$sdk_root" >> $env:GITHUB_ENV
echo "ANDROID_NDK_ROOT=$sdk_root\ndk-bundle" >> $env:GITHUB_ENV
# Update legacy path for ndk-build:
echo "ANDROID_HOME=$sdk_root" >> $env:GITHUB_ENV
# Unset legacy paths:
echo "ANDROID_NDK_HOME=" >> $env:GITHUB_ENV
echo "ANDROID_NDK_PATH=" >> $env:GITHUB_ENV
- name: Check compiling on target ${{ matrix.rust-target }}
run: |
cargo check -p ndk --target ${{ matrix.rust-target }} --all-features
cargo apk build -p ndk-examples --target ${{ matrix.rust-target }} --examples
- name: Cargo check for target ${{ matrix.rust-target }}
run: cargo check -p ndk --target ${{ matrix.rust-target }} --all-features

- name: Cargo apk build for target ${{ matrix.rust-target }}
run: cargo apk build -p ndk-examples --target ${{ matrix.rust-target }} --examples

- name: Check NDK docs for ${{ matrix.rust-target }}
env:
Expand Down

0 comments on commit 2e103a5

Please sign in to comment.