mirror of
https://github.com/encounter/ghidra-cli.git
synced 2026-07-10 03:18:56 -07:00
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>
60 lines
1.3 KiB
YAML
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
|