Skip to content

Merge pull request #46 from CERTCC/230921 #18

Merge pull request #46 from CERTCC/230921

Merge pull request #46 from CERTCC/230921 #18

Workflow file for this run

# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Release On Tag
on:
push:
tags:
- '*'
permissions:
contents: read
jobs:
build_kaiju:
permissions:
contents: write
strategy:
matrix:
os: [ubuntu-latest]
ghidra_version: [10.3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Download Ghidra ${{ matrix.ghidra_version }}
uses: robinraju/release-downloader@v1.7
with:
repository: "NationalSecurityAgency/ghidra"
tag: "Ghidra_${{ matrix.ghidra_version }}_build"
fileName: "ghidra*.zip"
out-file-path: "3rdparty"
- name: Unzip Ghidra ${{ matrix.ghidra_version }}
run: 7z x 3rdparty/ghidra_${{ matrix.ghidra_version }}_*.zip -o3rdparty/
- name: Download Z3 for Linux x64 (glibc)
uses: robinraju/release-downloader@v1.7
with:
repository: "Z3Prover/z3"
tag: "z3-4.12.1"
fileName: "z3-4.12.1-x64-glibc-2.35.zip"
- name: Unzip Z3 for Linux x64 (glibc)
run: |
7z x z3-4.12.1-x64-glibc-2.35.zip
cp z3-4.12.1-x64-glibc-2.35/bin/*.jar ${{ github.workspace }}/lib/
cp z3-4.12.1-x64-glibc-2.35/bin/*.so ${{ github.workspace }}/os/linux_x86_64/
rm z3-4.12.1-x64-glibc-2.35.zip
rm -r z3-4.12.1-x64-glibc-2.35/
- name: Download Z3 for Windows x64
uses: robinraju/release-downloader@v1.7
with:
repository: "Z3Prover/z3"
tag: "z3-4.12.1"
fileName: "z3-4.12.1-x64-win.zip"
- name: Unzip Z3 for Windows x64
run: |
7z x z3-4.12.1-x64-win.zip
cp z3-4.12.1-x64-win/bin/*.dll ${{ github.workspace }}/os/win_x86_64/
rm z3-4.12.1-x64-win.zip
rm -r z3-4.12.1-x64-win/
- name: Download Z3 for MacOS x64
uses: robinraju/release-downloader@v1.7
with:
repository: "Z3Prover/z3"
tag: "z3-4.12.1"
fileName: "z3-4.12.1-x64-osx-10.16.zip"
- name: Unzip Z3 for MacOS x64
run: |
7z x z3-4.12.1-x64-osx-10.16.zip
cp z3-4.12.1-x64-osx-10.16/bin/*.dylib ${{ github.workspace }}/os/mac_x86_64/
rm z3-4.12.1-x64-osx-10.16.zip
rm -r z3-4.12.1-x64-osx-10.16/
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: '7.6'
- name: Build with Gradle
env:
GHIDRA_INSTALL_DIR: '${{ github.workspace }}/3rdparty/ghidra_${{ matrix.ghidra_version }}_PUBLIC/'
KAIJU_AUTOCATS_DIR: '${{ github.workspace }}/autocats/'
run: |
gradle -PKAIJU_SKIP_Z3_BUILD --build-cache install
- name: Create Release if Needed
uses: ncipollo/release-action@v1.12.0
with:
skipIfReleaseExists: true
draft: false
prerelease: false
name: ${{ github.ref_name }}
body: "See CHANGELOG.md for more information."
- name: Upload Kaiju Extension for Ghidra ${{ matrix.ghidra_version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} ${{ github.workspace }}/dist/*.zip