-
Notifications
You must be signed in to change notification settings - Fork 6
ci: use actions/cache for Android NDK instead of broken local-cache #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Prompt To Fix With AIThis 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 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:
💡 Result: Short answer
Sources
🏁 Script executed: # Check if there are any other references to NDK paths in the workflow
rg "ndk|NDK" .github/workflows/release.yml -nRepository: OpenSecretCloud/Maple Length of output: 1264 NDK cache and setup need critical fixes to work reliably. The Fix: Capture the NDK path from the setup action output and use it consistently. Replace hardcoded paths with GitHub Actions cache limits (10 GB default per repo) are not a concern for the NDK size. 🤖 Prompt for AI Agents |
||
| - name: Install sccache | ||
|
|
@@ -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) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local-cache: truestill enabled but PR description says this option has symlink bugs. Consider removing since you're usingactions/cachenow.Prompt To Fix With AI