-
Notifications
You must be signed in to change notification settings - Fork 45
129 lines (107 loc) · 3.04 KB
/
main.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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/setup-ghidra@4ecf6e0dc501f8efc1d74d93645c6d5c1df7f441 # v1.2.1
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.2"
- "11.0.1"
- "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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Ghidra
uses: antoniovazquezblanco/setup-ghidra@4ecf6e0dc501f8efc1d74d93645c6d5c1df7f441 # v1.2.1
with:
auth_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.ghidra }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- 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@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
pattern: firmware_utils_ghidra_*
path: dist/
merge-multiple: true
- name: Upload to Releases
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true