forked from frida/frida
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
113 lines (113 loc) · 4.16 KB
/
.cirrus.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
task:
name: freebsd-x86_64
freebsd_instance:
image_family: freebsd-14-0
environment:
S3_ACCESS_KEY: ENCRYPTED[2f368bef589e43779394e459191eaad2fc4cc50dc36c6f03168a1e8e43897476e8bf596fd4dd0d988bcbab8fa8e171f8]
S3_SECRET_KEY: ENCRYPTED[45f352473433a1053622a662ce8d57bc7421bce5772c9c5caf4a0e54f63944bd420f71101e014876e038f0c66c134ac2]
CF_EMAIL: ENCRYPTED[a9f0dcd0ee83fa111c36f092f34b3d5660acafe0d07804d6b6a89bfa70a127ef8305f21089408959c51e23ecd2fd3622]
CF_TOKEN: ENCRYPTED[4f9f3f7c8603fd32978b825d65f34b06fce8e51bedb4303744c799d21fc38266173a6be5a7a46b5e616573d27c9f6e91]
PYTHON: /usr/local/bin/python3.11
PYTHON3: /usr/local/bin/python3.11
NODE_TARGETS_FREEBSD: '20.0.0'
ELECTRON_TARGETS_FREEBSD: '30.0.0'
timeout_in: 2h
install_dependencies_script: |
pkg install -y \
bash \
bison \
git \
npm \
py311-pip \
py311-setuptools
echo "CIRRUS_SHELL=$(which bash)" >> $CIRRUS_ENV
pip install awscli typing-extensions
npm install -g cloudflare-cli
clone_script: |
if [ -z "$CIRRUS_PR" ]; then
git clone --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
else
git clone https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
fi
git reset --hard $CIRRUS_CHANGE_IN_REPO
$PYTHON tools/ensure-submodules.py
setup_environment_script: |
echo "FRIDA_PREFIX=$CIRRUS_WORKING_DIR/dist" >> $CIRRUS_ENV
echo "FRIDA_VERSION=$(python releng/frida_version.py)" >> $CIRRUS_ENV
mkdir -p ~/.aws
(
echo "[default]"
echo "region = us-east-1"
) > ~/.aws/config
(
echo "[default]"
echo "aws_access_key_id = $S3_ACCESS_KEY"
echo "aws_secret_access_key = $S3_SECRET_KEY"
) > ~/.aws/credentials
(
echo "defaults:"
echo " domain: frida.re"
echo " email: $CF_EMAIL"
echo " token: $CF_TOKEN"
) > ~/.cfcli.yml
roll_toolchain_script: $PYTHON releng/deps.py roll toolchain freebsd-x86_64 --activate
roll_sdk_script: $PYTHON releng/deps.py roll sdk freebsd-x86_64
configure_script: >-
./configure
"--prefix=$FRIDA_PREFIX"
--enable-gadget
--enable-server
--enable-portal
--enable-inject
--
-Dfrida-gum:devkits=gum,gumjs
-Dfrida-core:devkits=core
compile_script: make
install_script: make install
frida_gum_devkit_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/lib/frida/devkits/gum/*"
frida_gumjs_devkit_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/lib/frida/devkits/gumjs/*"
frida_core_devkit_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/lib/frida/devkits/core/*"
frida_server_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/bin/frida-server"
frida_portal_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/bin/frida-portal"
frida_inject_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/bin/frida-inject"
frida_gadget_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/lib/frida/64/frida-gadget.so"
package_python_script: |
export FRIDA_EXTENSION=$(find "$FRIDA_PREFIX" -name _frida.abi3.so)
cd subprojects/frida-python
pip wheel -w "$FRIDA_PREFIX/wheels" --no-deps .
frida_python_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/wheels/*.whl"
build_node_script: |
installdir=$FRIDA_PREFIX/prebuilds
declare -A prebuilds=(
[node]="$NODE_TARGETS_FREEBSD"
[electron]="$ELECTRON_TARGETS_FREEBSD"
)
export FRIDA_DEPS=$PWD/deps
export PKG_CONFIG_PATH=$FRIDA_PREFIX/libdata/pkgconfig
python tools/ensure-submodules.py frida-node
cd subprojects/frida-node
npm version $FRIDA_VERSION
mkdir "$installdir"
for runtime in "${!prebuilds[@]}"; do
targets=${prebuilds[$runtime]}
for target in $targets; do
./configure \
"--prefix=$FRIDA_PREFIX" \
--with-runtime=$runtime \
--with-target=$target
make prebuild
cp build/*.tar.gz "$installdir"
rm -rf build
done
done
frida_node_freebsd_x86_64_artifacts:
path: "$FRIDA_PREFIX/prebuilds/*"