Skip to content

Add Claude Code GitHub Workflow - #20

Merged
quinnjr merged 2 commits into
mainfrom
add-claude-github-actions-1787089796120
Aug 18, 2026
Merged

quinnjr merged 2 commits into
mainfrom
add-claude-github-actions-1787089796120

Conversation

@quinnjr

@quinnjr quinnjr commented Aug 18, 2026

Copy link
Copy Markdown
Owner

🤖 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

How it works

Once this PR is merged, we'll be able to interact with Claude by mentioning @clhi, thank you for developing this project!

I encountered some compilation issues when building the abp crate for Android targets. After investigation I found the root cause and would like to share for your reference.

Problem

When compiling crates/abp for Android targets using cargo-ndk, there are 16 type mismatch errors. The root cause is that Android Bionic's libc::c_char is u8, while io.rs hardcodes as *const i8. Similarly, st_mode and S_IFMT constants have different widths on Android compared to Linux glibc.

My environment

rustc:           1.96.0 (ac68faa20 2026-05-25)
cargo-ndk:       4.1.2
Android NDK:     r30 (30.0.14904198)
host:            macOS (Darwin 25.5.0, aarch64)
libc crate:      0.2.178
targets tested:  aarch64-linux-android, armv7-linux-androideabi

Build commands

cargo ndk -t arm64-v8a build --release -p abp
cargo ndk -t armeabi-v7a build --release -p abp

Error output

error[E0308]: mismatched types
   --> crates/abp/src/io.rs:101:25
    |
101 |     unsafe { libc::open(path_buf.as_ptr() as *const i8, flags, mode) }
    |              ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`

There are 10 similar errors in io.rs (open, stat, mkdir, rmdir, unlink, rename, symlink, chmod, access, opendir). Additionally, remove.rs:143 and verify.rs:239 have type mismatches in bitwise operations between st_mode and S_IFMT.

My workaround

I made the following changes locally, and both arm64 and arm32 targets now compile successfully. The binaries were verified to run correctly on an Android device:

crates/abp/src/io.rs — Replace as *const i8 with as *const libc::c_char (10 places). This is compatible with both c_char = i8 (glibc/musl) and c_char = u8 (Bionic):

// before
unsafe { libc::open(path_buf.as_ptr() as *const i8, flags, mode) }
// after
unsafe { libc::open(path_buf.as_ptr() as *const libc::c_char, flags, mode) }

crates/abp/src/remove.rs:143 and crates/abp/src/verify.rs:239 — Add as u32 casts to st_mode and S_IFMT constants:

// before
if (stat_buf.st_mode & libc::S_IFMT) == libc::S_IFDIR {
// after
if (stat_buf.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFDIR as u32 {

Build verification

Build results after the fix:

dist/abpd-gen-arm64  288K  ELF 64-bit LSB pie executable, ARM aarch64, stripped
dist/abpd-gen-arm32  215K  ELF 32-bit LSB pie executable, ARM, EABI5, stripped

Device runtime test (arm64 emulator):

$ adb shell /data/local/tmp/abpd-gen
ABPD

I'm not sure if this is a known issue or if there's a better approach (e.g., conditional compilation for Android in the build pipeline). Happy to submit a PR i

fix-android-cross-compile.patch

f that would be helpful. Thanks!aude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.

Important Notes

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

There's more information in the Claude Code action repo.

After merging this PR, let's try mentioning @claude in a comment on any PR to get started!

@quinnjr
quinnjr merged commit 6dc93f3 into main Aug 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant