Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 9 additions & 3 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,18 @@ jobs:
${{ runner.os }}-cargo-${{ matrix.rust_target }}-
${{ runner.os }}-cargo-
- name: Cache Android NDK
uses: actions/cache@v4
id: ndk-cache
with:
path: /home/runner/.setup-ndk/r27c
key: ${{ runner.os }}-ndk-r27c

- name: Setup Android NDK
if: steps.ndk-cache.outputs.cache-hit != 'true'
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27c
add-to-path: true
local-cache: true
Copy link
Contributor

Choose a reason for hiding this comment

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

local-cache: true still enabled but PR description says this option has symlink bugs. Consider removing since you're using actions/cache now.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/android-build.yml
Line: 142:142

Comment:
`local-cache: true` still enabled but PR description says this option has symlink bugs. Consider removing since you're using `actions/cache` now.

How can I resolve this? If you propose a fix, please make it concise.


- name: Install sccache
Expand Down Expand Up @@ -181,7 +187,7 @@ jobs:
- name: Build Rust library (${{ matrix.rust_target }})
run: |
export NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
export NDK_HOME=/home/runner/.setup-ndk/r27c
export PATH=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# C toolchain env for build scripts (e.g. openssl-sys)
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,18 @@ jobs:
${{ runner.os }}-cargo-release-${{ matrix.rust_target }}-
${{ runner.os }}-cargo-
- name: Cache Android NDK
uses: actions/cache@v4
id: ndk-cache
with:
path: /home/runner/.setup-ndk/r27c
key: ${{ runner.os }}-ndk-r27c

- name: Setup Android NDK
if: steps.ndk-cache.outputs.cache-hit != 'true'
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27c
add-to-path: true
local-cache: true
Copy link
Contributor

Choose a reason for hiding this comment

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

local-cache: true still enabled but PR description says this option has symlink bugs. Consider removing since you're using actions/cache now.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release.yml
Line: 267:267

Comment:
`local-cache: true` still enabled but PR description says this option has symlink bugs. Consider removing since you're using `actions/cache` now.

How can I resolve this? If you propose a fix, please make it concise.


Comment on lines 255 to 267
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

nttld/setup-ndk v1 default install directory path

💡 Result:

nttld/setup-ndk@v1 does not expose a single fixed global path — it downloads/extracts the requested NDK for the runner/workflow and returns the actual install location as the action output steps..outputs.ndk-path. Use that output (examples show ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}). [1]

Source: action marketplace page / usage examples. [1]


🌐 Web query:

GitHub Actions cache size limit per repository

💡 Result:

Short answer

  • Default per-repository cache quota: 10 GB. [1][2]
  • Unused caches (not accessed) are eligible for eviction after 7 days; when the repo exceeds its quota, least‑recently‑used caches are evicted. [1][3]
  • You can raise the per‑repo limit (paid, admin-configurable / pay‑as‑you‑go). Enterprise/org admins can set higher maxima — Enterprise Cloud docs note configurable limits up to 10,000 GB per repo (and GitHub announced support for >10 GB with billing). [2][3]

Sources

  • actions/cache README (cache limits & eviction). [1]
  • GitHub changelog: cache can exceed 10 GB / pay-as-you-go (Nov 20, 2025). [2]
  • GitHub Docs — managing Actions cache settings / Enterprise Cloud limits (configurable maxes, eviction/retention). [3]

🏁 Script executed:

# Check if there are any other references to NDK paths in the workflow
rg "ndk|NDK" .github/workflows/release.yml -n

Repository: OpenSecretCloud/Maple

Length of output: 1264


NDK cache and setup need critical fixes to work reliably.

The nttld/setup-ndk@v1 action returns the NDK install path dynamically via steps.ndk-cache.outputs.ndk-path — it does not guarantee installation to /home/runner/.setup-ndk/r27c. The workflow currently hardcodes this path in both the cache configuration (line 259) and environment variables (lines 315–328), creating a mismatch: the cache may miss if the action installs elsewhere, and the hardcoded NDK_HOME may point to the wrong location.

Fix: Capture the NDK path from the setup action output and use it consistently. Replace hardcoded paths with ${{ steps.setup-ndk.outputs.ndk-path }}.

GitHub Actions cache limits (10 GB default per repo) are not a concern for the NDK size.

🤖 Prompt for AI Agents
In @.github/workflows/release.yml around lines 255 - 267, The workflow hardcodes
the NDK install path and thus mismatches the dynamic path returned by the setup
action; update the cache and environment usage to consume the setup action
output instead: read the NDK path from the setup action's output
(steps.setup-ndk.outputs.ndk-path) returned by uses: nttld/setup-ndk@v1 (the
step currently referenced as setup-ndk), replace the hardcoded
/home/runner/.setup-ndk/r27c used in the actions/cache step (id: ndk-cache) and
any NDK-related env vars (NDK_HOME, ANDROID_NDK_HOME, etc.) with that output
reference so the cache key/path and environment variables consistently use ${{
steps.setup-ndk.outputs.ndk-path }}.

- name: Install sccache
Expand Down Expand Up @@ -306,7 +312,7 @@ jobs:
- name: Build Rust library (${{ matrix.rust_target }})
run: |
export NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}
export NDK_HOME=/home/runner/.setup-ndk/r27c
export PATH=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# C toolchain env for build scripts (e.g. openssl-sys)
Expand Down
Loading