Choose the "base address" off of the first segment base in decompilers #539
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: 15 | |
| 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 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "oracle" | |
| java-version: "17" | |
| - name: Install Ghidra | |
| uses: antoniovazquezblanco/[email protected] | |
| with: | |
| version: "11.1" | |
| 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_remote_ghidra.py -s | |
| TEST_BINARIES_DIR=/tmp/bs-artifacts/binaries pytest ./tests/test_decompilers.py -s |