Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 6 additions & 24 deletions .github/workflows/build-quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,30 +188,12 @@ jobs:
${{ runner.os }}-rust-debug
${{ runner.os }}-rust

- name: Read configured NDK version
run: |
cargo install toml-cli
ANDROID_NDK_VERSION=$(toml get gradle/libs.versions.toml versions.ndk --raw)
echo "ANDROID_NDK_VERSION=$ANDROID_NDK_VERSION" >> $GITHUB_ENV
shell: bash
Comment on lines -191 to -196
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the part where we source the version we want from a single source of truth, which was a non-trivial effort and enables us to set the NDK in one and only one place

This block needs to remain


- name: Install/Set NDK version (Unix)
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"
./.github/scripts/install_ndk.sh ${ANDROID_NDK_VERSION}
export ANDROID_NDK_LATEST_HOME="${ANDROID_SDK_ROOT}/ndk/${ANDROID_NDK_VERSION}"
echo "ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME" >> $GITHUB_ENV
echo "ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME" >> $GITHUB_ENV

- name: Install/Set NDK version (Windows)
if: contains(matrix.os, 'windows')
run: |
$env:PATH = "$env:PATH;$env:ANDROID_HOME\cmdline-tools\latest\bin"
./.github/scripts/install_ndk.bat $env:ANDROID_NDK_VERSION
$env:ANDROID_NDK_LATEST_HOME = "$env:ANDROID_SDK_ROOT\ndk\$env:ANDROID_NDK_VERSION"
Add-Content -Path $env:GITHUB_ENV -Value ANDROID_NDK_HOME=$env:ANDROID_NDK_LATEST_HOME
Add-Content -Path $env:GITHUB_ENV -Value ANDROID_NDK_ROOT=$env:ANDROID_NDK_LATEST_HOME
- name: Setup Android NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: r29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to use the result of the block above that sets the version from the single source of truth

add-to-path: false
local-cache: true

- name: Configure JDK
uses: actions/setup-java@v5
Expand Down