Skip to content

Keep a dead server explainable after its record is pruned (#228) #768

Keep a dead server explainable after its record is pruned (#228)

Keep a dead server explainable after its record is pruned (#228) #768

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Decompiler Tests
env:
BN_SERIAL: ${{ secrets.BN_SERIAL }}
BN_LICENSE: ${{ secrets.BN_LICENSE }}
TOOLING_KEY: ${{ secrets.TOOLING_KEY }}
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Download BS Artifact & Install IDA
run: |
(git clone https://github.com/binsync/bs-artifacts.git /tmp/bs-artifacts && \
cd /tmp/bs-artifacts && \
./helpers/setup_ida_ci.sh)
# taken from https://github.com/mandiant/capa/blob/master/.github/workflows/tests.yml#L107-L147
- name: Install Binary Ninja
if: ${{ env.BN_SERIAL != 0 }}
run: |
mkdir ./.github/binja
curl "https://raw.githubusercontent.com/Vector35/binaryninja-api/6812c97/scripts/download_headless.py" -o ./.github/binja/download_headless.py
python ./.github/binja/download_headless.py --serial ${{ env.BN_SERIAL }} --output .github/binja/BinaryNinja-headless.zip
unzip .github/binja/BinaryNinja-headless.zip -d .github/binja/
python .github/binja/binaryninja/scripts/install_api.py --install-on-root --silent
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: "oracle"
java-version: "21"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "8.12.1"
- name: Test the JADX bridge
run: |
gradle --no-daemon -p declib/decompilers/jadx/worker test stageBridge
git diff --exit-code -- declib/decompilers/jadx/worker/bridge/declib-jadx-worker.jar
pytest tests/test_jadx.py -v
- name: Install Ghidra
uses: antoniovazquezblanco/setup-ghidra@v2.0.12
with:
version: "12.0"
auth_token: ${{ secrets.GITHUB_TOKEN }}
- name: Pytest
run: |
# these two test must be run in separate python environments, due to the way ghidra bridge works
# you also must run these tests in the exact order shown here
TEST_BINARIES_DIR=/tmp/bs-artifacts/binaries pytest \
tests/test_decompilers.py \
tests/test_client_server.py \
tests/test_decompiler_cli.py \
-sv