Skip to content

CI: Support Ghidra 11.0.1/11.0.2 #105

CI: Support Ghidra 11.0.1/11.0.2

CI: Support Ghidra 11.0.1/11.0.2 #105

Workflow file for this run

name: Java CI
on:
push:
branches: ['**']
pull_request:
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
jobs:
build-natives:
strategy:
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Ghidra
uses: antoniovazquezblanco/setup-ghidra@4ecf6e0dc501f8efc1d74d93645c6d5c1df7f441 # v1.2.1
with:
auth_token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/[email protected]
- name: Build natives
run: ./gradlew efidecompressSharedLibrary copyLibraries -PGHIDRA_INSTALL_DIR=${{ env.GHIDRA_INSTALL_DIR }}
- name: Upload natives
uses: actions/upload-artifact@v4
with:
name: libefidecompress_${{ matrix.os }}
path: |
os/*/*
!os/*/README.txt
build-extension:
strategy:
matrix:
ghidra:
- "11.0.2"
- "11.0.1"
- "11.0"
- "10.4"
- "10.3.3"
- "10.3.2"
- "10.3.1"
- "10.3"
- "10.2.3"
- "10.2.2"
- "10.2.1"
- "10.2"
needs: build-natives
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Ghidra
uses: antoniovazquezblanco/setup-ghidra@4ecf6e0dc501f8efc1d74d93645c6d5c1df7f441 # v1.2.1
with:
auth_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.ghidra }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Download precompiled natives
uses: actions/download-artifact@v4
with:
path: os/
merge-multiple: true
- name: Build the plugin
run: ./gradlew -PGHIDRA_INSTALL_DIR=${{ env.GHIDRA_INSTALL_DIR }}
- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware_utils_ghidra_${{ matrix.ghidra }}
path: dist/*.zip
release:
runs-on: "ubuntu-latest"
needs: build-extension
if: github.event_name == 'release'
steps:
- name: Download binaries
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
pattern: firmware_utils_ghidra_*
path: dist/
merge-multiple: true
- name: Upload to Releases
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true