configure Ghidrathon using absolute path of Python interpreter used to install Jep #17
This file contains 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
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tests: | |
name: Tests in ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ghidra-release-url: ["https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.0_build/ghidra_11.0_PUBLIC_20231222.zip"] | |
os: [ubuntu-20.04, windows-2019, macos-11] | |
python-version: ["3.8"] | |
steps: | |
- name: Checkout Ghidrathon | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: "7.3" | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python Jep | |
run: | | |
pip install jep==4.2.0 | |
python -c "import importlib.util;import pathlib;print(pathlib.Path(importlib.util.find_spec('jep').origin).parent)" | |
- name: Prepare for downloads | |
run: mkdir ./tmp | |
- name: Download Ghidra Linux/macOS | |
if : ${{ matrix.os != 'windows-2019' }} | |
run: | | |
wget ${{ matrix.ghidra-release-url }} -O ./tmp/ghidra.zip | |
unzip ./tmp/ghidra.zip -d ./tmp/ghidra | |
mv ./tmp/ghidra/$(ls ./tmp/ghidra) ./tmp/ghidra/ghidra_PUBLIC | |
- name: Download Ghidra Windows | |
if : ${{ matrix.os == 'windows-2019' }} | |
shell: pwsh | |
run: | | |
Invoke-WebRequest -URI "${{ matrix.ghidra-release-url }}" -OutFile "./tmp/ghidra.zip" | |
mkdir ./tmp/ghidra | |
tar -xf .\tmp\ghidra.zip -C .\tmp\ghidra | |
Rename-Item -Path "./tmp/ghidra/$((Get-ChildItem -Path "./tmp/ghidra").BaseName)" -NewName "ghidra_PUBLIC" | |
(Get-ChildItem -Path "./tmp/ghidra").BaseName |