forked from cmu-sei/kaiju
-
Notifications
You must be signed in to change notification settings - Fork 22
67 lines (63 loc) · 2.26 KB
/
run_tests_on_push_pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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", "11.0", "11.0.1", "11.0.2", "11.0.3", "11.1", "11.1.1", "11.1.2", "11.2", "11.2.1"]
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 21
uses: actions/setup-java@v3
with:
java-version: '21'
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: '8.7'
- 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