-
Notifications
You must be signed in to change notification settings - Fork 8
151 lines (126 loc) · 3.98 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Build and publish graffiti
on:
push:
branches:
- "master"
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
check-server-python-compat:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Vermin
run: python -m pip install vermin
- name: Check for python version violation
run: vermin --config-file server/vermin.ini --quiet --violations server/
backend:
runs-on: ubuntu-latest
needs: check-server-python-compat
strategy:
matrix:
target:
- { name: jeb, type: pybunch }
- { name: intellij, type: java }
- { name: ghidra, type: java }
- { name: ida, type: pybunch }
- { name: vscode, type: typescript }
- { name: websites, type: typescript }
- { name: jadx, type: pack }
- { name: server, type: pybunch }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
if: matrix.target.type == 'typescript'
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
if: matrix.target.type == 'java'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 7.6
if: matrix.target.type == 'java'
- uses: er28-0652/setup-ghidra@master
with:
version: "11.0.3"
if: matrix.target.name == 'ghidra'
- name: Configure
run: make init
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
if: matrix.target.type == 'pybunch'
- name: Install pybunch
run: python -m pip install pybunch
if: matrix.target.type == 'pybunch'
- name: Build ${{ matrix.target.name }}
run: make ${{ matrix.target.name }}
- name: Upload Artifact
uses: actions/[email protected]
with:
name: Graffiti for ${{ matrix.target.name }}
path: out/*
frontend:
runs-on: ubuntu-latest
needs: backend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure
run: make init
- name: Build web frontend
run: make web
- name: Upload Artifact
uses: actions/[email protected]
with:
name: Graffiti web frontend
path: out/*
- name: Download backends
uses: actions/download-artifact@v4
with:
path: /tmp/artifacts
- name: Copy backends
run: find /tmp/artifacts -type f -exec cp -v {} out/ \;
- name: Pack web frontend with backends
run: make web-collect
- name: Upload Artifact
uses: actions/[email protected]
with:
name: Graffiti Web frontend with backends
path: out/*_frontend_web_with_deps.zip
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: frontend
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Download web frontend
uses: actions/download-artifact@v4
with:
path: /tmp
name: Graffiti Web frontend with backends
- name: Unzip web frotnend
run: mkdir /tmp/web && unzip /tmp/*_frontend_web_with_deps.zip -d /tmp/web
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: /tmp/web
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4