-
Notifications
You must be signed in to change notification settings - Fork 14
133 lines (129 loc) · 3.02 KB
/
ci.yaml
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
130
131
132
133
name: "ci"
on:
push:
branches:
- "*"
tags:
- "v*"
pull_request:
jobs:
spotless:
runs-on: ubuntu-latest
steps:
-
name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
-
name: "Setup JDK"
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
-
name: "Setup Ghidra"
uses: er28-0652/setup-ghidra@master
with:
version: "11.0"
-
name: "Run spotless"
run: gradle spotlessCheck
build:
runs-on: ubuntu-latest
permissions:
checks: "write"
strategy:
fail-fast: false
matrix:
ghidra:
- "10.3.3"
- "10.4"
- "11.0"
steps:
-
name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
-
name: "Setup JDK"
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
-
name: "Setup Ghidra"
uses: er28-0652/setup-ghidra@master
with:
version: ${{ matrix.ghidra }}
-
name: "Build extension"
run: gradle buildExtension
-
name: "Upload artifacts"
uses: actions/upload-artifact@v3
with:
path: "dist/*"
if-no-files-found: "error"
if: ${{ !cancelled() }}
-
name: "Run tests"
uses: coactions/setup-xvfb@v1
with:
run: gradle test jacocoTestReport
-
name: "Collect test reports"
uses: dorny/test-reporter@v1
with:
name: "JUnit tests (${{ matrix.ghidra }})"
path: "build/test-results/test/*.xml"
reporter: java-junit
if: ${{ !cancelled() }}
-
name: "Upload reports"
uses: actions/upload-artifact@v3
with:
name: "reports (${{ matrix.ghidra }})"
path: "build/reports/*"
if-no-files-found: "error"
if: ${{ !cancelled() }}
release:
if: startsWith(github.ref, 'refs/tags/v')
needs:
- "build"
runs-on: ubuntu-latest
permissions:
contents: "write"
steps:
-
name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
-
name: "Setup JDK"
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
java-package: "jre"
-
name: "Download artifacts"
uses: actions/download-artifact@v3
with:
name: "artifact"
path: "dist/"
-
name: "Generate release notes"
run: ./developer_scripts/generate-release-notes.sh | tee release-notes.md
-
name: "GitHub release"
uses: ncipollo/[email protected]
with:
artifacts: "dist/*"
draft: true
bodyFile: "release-notes.md"