-
-
Notifications
You must be signed in to change notification settings - Fork 250
255 lines (247 loc) · 8.38 KB
/
ci.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
GUM_OPTIONS: '--enable-gumpp --enable-gumjs --with-devkits=gum,gumjs --enable-tests'
jobs:
gir:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
gobject-introspection \
libdwarf-dev \
libelf-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libjson-glib-dev \
libsoup-3.0-dev \
libsqlite3-dev \
libunwind-dev \
ninja-build
- name: Build
run: |
./configure \
--enable-shared \
--without-prebuilds=toolchain,sdk \
--disable-tests
make
- name: Upload GObject introspection data
uses: actions/upload-artifact@v4
with:
name: gum-gir
path: |
build/gum/Gum-1.0.gir
build/gum/Gum-1.0.typelib
native:
strategy:
matrix:
include:
- { id: windows-x86_64, runner: '"windows-latest"' }
- { id: windows-x86, runner: '"windows-latest"' }
- { id: macos-x86_64, runner: '"macos-13"' }
- { id: macos-arm64, runner: '"macos-latest"' }
- { id: linux-x86_64, runner: '"ubuntu-latest"' }
- { id: linux-x86, runner: '"ubuntu-latest"' }
- { id: freebsd-arm64, runner: '["self-hosted", "freebsd", "arm64"]' }
fail-fast: false
runs-on: ${{ fromJSON(matrix.runner) }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install gcc-multilib
if: matrix.id == 'linux-x86'
run: sudo apt-get install gcc-multilib lib32stdc++-11-dev
- name: Build
if: ${{ startsWith(matrix.id, 'windows-') }}
run: |
.\configure ${{ env.GUM_OPTIONS }}
.\make
- name: Build
if: ${{ !startsWith(matrix.id, 'windows-') && matrix.id != 'linux-x86' }}
run: |
./configure ${{ env.GUM_OPTIONS }}
make
- name: Build
if: matrix.id == 'linux-x86'
run: |
CC="gcc -m32" CXX="g++ -m32" STRIP="strip" \
./configure --build=linux-x86 --host=linux-x86 ${{ env.GUM_OPTIONS }}
make
- name: Upload Gum devkit
if: ${{ !startsWith(matrix.id, 'linux-') }}
uses: actions/upload-artifact@v4
with:
name: gum-devkit-${{ matrix.id }}
path: build/gum/devkit/
- name: Upload GumJS devkit
if: ${{ !startsWith(matrix.id, 'linux-') }}
uses: actions/upload-artifact@v4
with:
name: gumjs-devkit-${{ matrix.id }}
path: build/bindings/gumjs/devkit/
- name: Test
run: make test
cross:
strategy:
matrix:
include:
- { id: windows-x86_64-mingw, opts: '--host=x86_64-w64-mingw32 --without-prebuilds=sdk:host', pkg: g++-mingw-w64-x86-64 }
- { id: windows-x86-mingw, opts: '--host=i686-w64-mingw32 --without-prebuilds=sdk:host', pkg: g++-mingw-w64-i686 }
- { id: linux-mips, opts: '--host=mips-linux-gnu', pkg: g++-mips-linux-gnu }
- { id: linux-mipsel, opts: '--host=mipsel-linux-gnu', pkg: g++-mipsel-linux-gnu }
- { id: linux-mips64, opts: '--host=mips64-linux-gnuabi64', pkg: g++-mips64-linux-gnuabi64 }
- { id: linux-mips64el, opts: '--host=mips64el-linux-gnuabi64', pkg: g++-mips64el-linux-gnuabi64 }
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install toolchain
run: sudo apt-get install ${{ matrix.pkg }}
- name: Build
run: |
./configure ${{ matrix.opts }} ${{ env.GUM_OPTIONS }}
make
- name: Upload Gum devkit
if: ${{ !startsWith(matrix.id, 'linux-') }}
uses: actions/upload-artifact@v4
with:
name: gum-devkit-${{ matrix.id }}
path: build/gum/devkit/
- name: Upload GumJS devkit
if: ${{ !startsWith(matrix.id, 'linux-') }}
uses: actions/upload-artifact@v4
with:
name: gumjs-devkit-${{ matrix.id }}
path: build/bindings/gumjs/devkit/
manylinux:
strategy:
matrix:
arch: [x86, x86_64, x86_64-musl, armhf, arm64, arm64-musl, mips, mipsel, mips64, mips64el]
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/frida/x-tools-linux-${{ matrix.arch }}:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
./configure --host=$XTOOLS_HOST ${{ env.GUM_OPTIONS }}
make
- name: Upload Gum devkit
uses: actions/upload-artifact@v4
with:
name: gum-devkit-linux-${{ matrix.arch }}
path: build/gum/devkit/
- name: Upload GumJS devkit
uses: actions/upload-artifact@v4
with:
name: gumjs-devkit-linux-${{ matrix.arch }}
path: build/bindings/gumjs/devkit/
- name: Test
if: matrix.arch == 'x86' || matrix.arch == 'x86_64'
run: make test
mobile:
strategy:
matrix:
id:
- ios-arm64
- android-x86
- android-x86_64
- android-arm
- android-arm64
fail-fast: false
runs-on: ${{ startsWith(matrix.id, 'ios-') && 'macos-latest' || 'ubuntu-latest' }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
./configure --host=${{ matrix.id }} ${{ env.GUM_OPTIONS }}
make
- name: Upload Gum devkit
uses: actions/upload-artifact@v4
with:
name: gum-devkit-${{ matrix.id }}
path: build/gum/devkit/
- name: Upload GumJS devkit
uses: actions/upload-artifact@v4
with:
name: gumjs-devkit-${{ matrix.id }}
path: build/bindings/gumjs/devkit/
- name: Package tests
run: tar -C build/tests -czf /tmp/runner.tar.gz gum-tests data/
- name: Test on Corellium iOS device
if: matrix.id == 'ios-arm64'
uses: frida/corellium-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
gateway: corellium.frida.re
device: ios-12.5.7-arm64
upload: /tmp/runner.tar.gz
run: |
cd /usr/local
rm -rf opt/frida
mkdir -p opt/frida
cd opt/frida
tar xf $ASSET_PATH
./gum-tests
- name: Test on Corellium Android device
if: matrix.id == 'android-arm64'
uses: frida/corellium-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
gateway: corellium.frida.re
device: android-8.1.0-arm64
upload: /tmp/runner.tar.gz
run: |
cd /data/local/tmp
tar xf $ASSET_PATH
./gum-tests
qnx-armeabi:
runs-on: ubuntu-latest
container: ghcr.io/frida/qnx-tools:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
CFLAGS="--sysroot=$QNX_TARGET/armle-v7" \
./configure --host=arm-unknown-nto-qnx6.5.0eabi ${{ env.GUM_OPTIONS }}
make
- name: Upload Gum devkit
uses: actions/upload-artifact@v4
with:
name: gum-devkit-qnx-armeabi
path: build/gum/devkit/
- name: Upload GumJS devkit
uses: actions/upload-artifact@v4
with:
name: gumjs-devkit-qnx-armeabi
path: build/bindings/gumjs/devkit/
- name: Test
run: |
tar -C build/tests -cf /tmp/runner.tar gum-tests data/
/opt/sabrelite/run.sh /tmp/runner.tar /opt/frida/gum-tests