-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugs fixed, category changed, better DRCOV support
closes #7, closes #8, closes #9, closes #10, closes #11, closes #12; Fixes a parsing issue when handling large base address values. Fixes a coverage accuracy issue that stemmed from using a BasicBlockModel instead of a SimpleBlockModel. Changed the category from DECOMPILER to ANALYSIS. The code should now build for Ghidra 11.1.x. Made the loadCoverageFile() function public and created a public function called processCoverageFile() to be used by other plugins, as suggested by @N-I-N-0. Added support for DRCOV module versions 1, 2, 3, and 4. Thanks to @datalocaltmp, @krisi0903, and @antoniovazquezblanco for valuable feedback.
- Loading branch information
Showing
7 changed files
with
175 additions
and
154 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,54 +2,66 @@ name: build | |
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
branches: [ "*" ] | ||
release: | ||
types: [ published ] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# Root directory for doing Ghidra work (building, etc.) | ||
root: ["/tmp/ghidra"] | ||
# Ghidra build version(s) | ||
version: ["10.4", "11.0.2"] | ||
include: | ||
- version: "10.4" | ||
release_url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_10.4_build" | ||
filename: "ghidra_10.4_PUBLIC_20230928.zip" | ||
directory: "ghidra_10.4_PUBLIC" | ||
- version: "11.0.2" | ||
release_url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.0.2_build" | ||
filename: "ghidra_11.0.2_PUBLIC_20240326.zip" | ||
directory: "ghidra_11.0.2_PUBLIC" | ||
version: | ||
- "11.1.2" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Clone Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
|
||
- name: Download Ghidra | ||
run: | | ||
wget -P ${{matrix.root}} -q ${{matrix.release_url}}/${{matrix.filename}} | ||
unzip -d ${{matrix.root}} -q ${{matrix.root}}/${{matrix.filename}} | ||
- name: Install Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
- name: Install Ghidra ${{matrix.version}} | ||
uses: antoniovazquezblanco/setup-[email protected] | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
version: ${{matrix.version}} | ||
|
||
- name: Build plugin via gradle | ||
run: gradle -PGHIDRA_INSTALL_DIR=${{matrix.root}}/${{matrix.directory}} -PZIP_NAME_PREFIX=ghidra_${{matrix.version}} | ||
run: gradle -PZIP_NAME_PREFIX=ghidra_${{matrix.version}} | ||
|
||
# Uploading a ZIP file as an artifact creates a double-ZIP | ||
- name: Fix artifact ZIP | ||
run: unzip -d dist/${{matrix.version}} dist/*_${{matrix.version}}_*.zip | ||
- name: Rename artifact ZIP | ||
run: mv dist/*_${{matrix.version}}_*.zip dist/ghidra_${{matrix.version}}_${{github.event.repository.name}}.zip | ||
|
||
# Upload the unzipped contents as the artifact to create a Ghidra-loadable ZIP file | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ghidra_${{matrix.version}}_Cartographer | ||
path: dist/${{matrix.version}}/* | ||
if-no-files-found: error | ||
name: ghidra_${{matrix.version}}_${{github.event.repository.name}} | ||
path: dist/*${{github.event.repository.name}}.zip | ||
|
||
release: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download binaries | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Upload release ZIP | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
run: gh release upload ${{github.event.release.tag_name}} *${{github.event.repository.name}}/*.zip |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.