Files
ghidra-cli/.github/workflows/test.yml
T
Alexander KiselevandClaude Opus 4.6 57dbf62fd4 fix: handle batch commands locally and require Java 21 in CI
Batch was broken because it sent a single "batch" command to the Java
bridge, which rejected it. Now the Rust CLI parses each line of the
batch file as a sub-command and dispatches them individually through
execute_via_bridge, collecting results into a JSON response.

Also updated CI to install Java 21 (required by Ghidra 12.0.1).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 13:28:08 -08:00

60 lines
1.3 KiB
YAML

name: Test
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Cache Ghidra
uses: actions/cache@v4
with:
path: |
~/.local/share/ghidra-cli
~/Library/Application Support/ghidra-cli
~/AppData/Local/ghidra-cli
key: ghidra-${{ matrix.os }}-v2
- name: Build
run: cargo build --verbose
- name: Build test fixture
run: rustc --edition 2021 -o tests/fixtures/sample_binary tests/fixtures/sample_binary.rs
- name: Setup Ghidra
run: cargo run -- setup --force
- name: Run unit tests
run: cargo test --lib --verbose
- name: Run integration tests
run: cargo test --test '*' --verbose
env:
RUST_LOG: info