-
-
Notifications
You must be signed in to change notification settings - Fork 55
209 lines (205 loc) · 7.01 KB
/
build.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
on: [push, pull_request]
name: CI
jobs:
check:
name: Check
strategy:
matrix:
arch: [x86, x86_64]
include:
- arch: x86
target: i686-unknown-linux-gnu
- arch: x86_64
target: x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
components: rustfmt, clippy
- name: Download FRIDA
run: |
export FRIDA_VERSION=$(cat FRIDA_VERSION)
cd frida-gum-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-gum-devkit-$FRIDA_VERSION-linux-${{ matrix.arch }}.tar.xz -O frida-gum.tar.xz && tar xJvf frida-gum.tar.xz
cd ..
cd frida-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-core-devkit-$FRIDA_VERSION-linux-${{ matrix.arch }}.tar.xz -O frida-core.tar.xz && tar xJvf frida-core.tar.xz
- name: Install OpenSSL
if: ${{ matrix.arch == 'x86' }}
run: |
sudo apt-get update && sudo apt-get install gcc-multilib --fix-missing
git clone --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git /tmp/openssl/
cd /tmp/openssl/
./Configure linux-generic32 --prefix=/tmp/openssl/install/
make -j CFLAGS="-m32" LDFLAGS="-m32"
make install_sw
echo "OPENSSL_DIR=/tmp/openssl/install/" >> $GITHUB_ENV
- uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- name: Format Toml
run: taplo fmt --check
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.target }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.target }}
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target ${{ matrix.target }} -- -D warnings
test-gum:
name: Test Gum
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x86, x86_64]
include:
- arch: x86
os: ubuntu-latest
target: i686-unknown-linux-gnu
- arch: x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- arch: x86_64
os: macOS-latest
target: x86_64-apple-darwin
- arch: x86
os: windows-latest
target: i686-pc-windows-msvc
- arch: x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
exclude:
- os: macOS-latest
arch: x86
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
- name: Install gcc-multilib
if: ${{ matrix.target == 'i686-unknown-linux-gnu' && matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install gcc-multilib g++-multilib --fix-missing
- name: Test Gum
run: cd frida-gum && cargo test --target ${{ matrix.target }} --features=auto-download
- name: Test Gum with all features
run: cd frida-gum && cargo test --target ${{ matrix.target }} --all-features
test-frida:
name: Test Frida
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x86, x86_64]
include:
- arch: x86
os: ubuntu-latest
target: i686-unknown-linux-gnu
- arch: x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- arch: x86_64
os: macOS-latest
target: x86_64-apple-darwin
- arch: x86
os: windows-latest
target: i686-pc-windows-msvc
- arch: x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
exclude:
- os: macOS-latest
arch: x86
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
- name: Install gcc-multilib
if: ${{ matrix.target == 'i686-unknown-linux-gnu' && matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install gcc-multilib g++-multilib --fix-missing
- name: Test Frida
run: cd frida && cargo test --target ${{ matrix.target }} --features=auto-download
- name: Test Frida with all features
run: cd frida && cargo test --target ${{ matrix.target }} --all-features
docs:
name: Build Documentation
runs-on: ubuntu-latest
env:
DOCS_RS: 1
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Build Gum documentation
run: |
cd frida-gum
cargo rustdoc --features "event-sink invocation-listener"
check-nostd:
name: Check no_std
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
target: x86_64-unknown-linux-gnu
- name: Download FRIDA
run: |
export FRIDA_VERSION=$(cat FRIDA_VERSION)
cd frida-gum-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-gum-devkit-$FRIDA_VERSION-linux-x86_64.tar.xz -O frida-gum.tar.xz && tar xJvf frida-gum.tar.xz
cd ..
cd frida-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-core-devkit-$FRIDA_VERSION-linux-x86_64.tar.xz -O frida-core.tar.xz && tar xJvf frida-core.tar.xz
- name: Nostd
uses: actions-rs/cargo@v1
with:
command: run
args: --target x86_64-unknown-linux-gnu -p linux-no-std
build-ios:
runs-on: macOS-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: install ios
run: rustup target add aarch64-apple-ios
- name: install cargo ndk
run: cargo install cargo-ndk
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build iOS
run: cargo build --target aarch64-apple-ios --features=event-sink,invocation-listener,stalker-observer,stalker-params,auto-download