Skip to content

Merge pull request #28 from antoniovazquezblanco/ci #101

Merge pull request #28 from antoniovazquezblanco/ci

Merge pull request #28 from antoniovazquezblanco/ci #101

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/[email protected]
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"
- "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@v4
with:
fetch-depth: 0
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Ghidra
uses: antoniovazquezblanco/[email protected]
with:
auth_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.ghidra }}
- name: Setup Gradle
uses: gradle/[email protected]
- 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@v4
with:
pattern: firmware_utils_ghidra_*
path: dist/
merge-multiple: true
- name: Upload to Releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true