Fix #63 #24
Workflow file for this run
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 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: Run Tests on Push or PR | |
on: | |
push: | |
branches: [ "**" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Run Tests on Push or PR | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
ghidra_version: [10.3, 10.3.1, 10.3.2, 10.3.3, 10.4] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: z3-ccache | |
- name: Set up ccache PATH | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Download Ghidra ${{ matrix.ghidra_version }} | |
uses: robinraju/[email protected] | |
with: | |
repository: "NationalSecurityAgency/ghidra" | |
tag: "Ghidra_${{ matrix.ghidra_version }}_build" | |
fileName: "ghidra*.zip" | |
- name: Unzip Ghidra ${{ matrix.ghidra_version }} | |
run: 7z x ghidra_${{ matrix.ghidra_version }}_*.zip | |
- 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 }}/ghidra_${{ matrix.ghidra_version }}_PUBLIC/' | |
KAIJU_AUTOCATS_DIR: '${{ github.workspace }}/autocats/' | |
run: | | |
env CC="cache gcc" CXX="ccache g++" gradle --build-cache install | |
- name: Checkout AUTOCATS repo for testing | |
uses: actions/checkout@v3 | |
with: | |
repository: CERTCC/autocats | |
path: autocats | |
- name: Run tests with Gradle | |
env: | |
GHIDRA_INSTALL_DIR: '${{ github.workspace }}/ghidra_${{ matrix.ghidra_version }}_PUBLIC/' | |
KAIJU_AUTOCATS_DIR: '${{ github.workspace }}/autocats/' | |
DISPLAY: ':1' | |
run: | | |
sudo Xvfb :1 & | |
DISPLAY=:1 gradle --build-cache test |