Skip to content

Commit

Permalink
Test build matrix in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fmagin committed Feb 14, 2025
1 parent 6a88972 commit a595ee8
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,30 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Root directory for doing Ghidra work (building, etc.)
root: ["/tmp/ghidra"]
# Ghidra build version(s)
version: ["11.3"]
include:
- version: "11.3"
release_url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3_build"
filename: "ghidra_11.3_PUBLIC_20250205.zip"
directory: "ghidra_11.3_PUBLIC"

ghidra:
# - "latest"
- "11.3"
- "11.2.1"
- "11.1.2"
- "11.0.3"
- "10.4"
- "10.3.3"
- "10.2.3"
- "10.1.5"
steps:
- uses: actions/checkout@v4

- name: Download Ghidra
run: |
wget -P ${{matrix.root}} -q ${{matrix.release_url}}/${{matrix.filename}}
unzip -d ${{matrix.root}} -q ${{matrix.root}}/${{matrix.filename}}
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin

- name: Build plugin via gradle
run: gradle -PGHIDRA_INSTALL_DIR=${{matrix.root}}/${{matrix.directory}} -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

# Upload the unzipped contents as the artifact to create a Ghidra-loadable ZIP file
- name: Upload artifact
uses: actions/upload-artifact@v4
- name: Install Ghidra ${{ matrix.ghidra }}
uses: antoniovazquezblanco/setup-ghidra@v2.0.4
with:
name: ghidra_${{matrix.version}}_REAIT
path: dist/${{matrix.version}}/*
if-no-files-found: error
auth_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.ghidra }}

- name: Build
run: gradle buildExtension

0 comments on commit a595ee8

Please sign in to comment.