-
Notifications
You must be signed in to change notification settings - Fork 95
48 lines (43 loc) · 1.59 KB
/
nightly-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
name: Nightly CI
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
observability:
name: "User Story - Telemetry"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Deps
run: 'sudo apt-get update && sudo apt-get install -y jq'
- name: Install
run: './extremely-simple-setup.sh && pip install --no-build-isolation -e ./angr[telemetry] opentelemetry-sdk'
- name: Run
run: |
cd .. && python3 <<EOF
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchSpanProcessor,
ConsoleSpanExporter,
)
provider = TracerProvider()
processor = BatchSpanProcessor(ConsoleSpanExporter(out=open('/tmp/telemetry.json', 'w')))
provider.add_span_processor(processor)
# Sets the global default tracer provider
trace.set_tracer_provider(provider)
import angr
p = angr.Project('/bin/true', auto_load_libs=False)
cfg = p.analyses.CFGFast(normalize=True)
print(p.analyses.Decompiler('main').codegen.text)
EOF
- name: Validate
run: |
set +o pipefail
jq .name /tmp/telemetry.json | grep -m1 CFGFast
jq .attributes.\"project.binary_name\" /tmp/telemetry.json | grep -m1 /bin/true
jq .attributes.\"arg.func\" /tmp/telemetry.json | grep -m1 main