Skip to content

Commit f433c08

Browse files
committed
CIIII
1 parent 315eda0 commit f433c08

File tree

5 files changed

+197
-3
lines changed

5 files changed

+197
-3
lines changed

.github/workflows/jingle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: jingle
22

33
on:
44
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
59
pull_request:
610
workflow_dispatch:
711

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# This file is autogenerated by maturin v1.8.3
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: jingle_python
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
tags:
13+
- '*'
14+
pull_request:
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
linux:
22+
runs-on: ${{ matrix.platform.runner }}
23+
strategy:
24+
matrix:
25+
platform:
26+
- runner: ubuntu-22.04
27+
target: x86_64
28+
- runner: ubuntu-22.04
29+
target: x86
30+
- runner: ubuntu-22.04
31+
target: aarch64
32+
- runner: ubuntu-22.04
33+
target: armv7
34+
- runner: ubuntu-22.04
35+
target: s390x
36+
- runner: ubuntu-22.04
37+
target: ppc64le
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-python@v5
41+
with:
42+
python-version: 3.x
43+
- name: Build wheels
44+
uses: PyO3/maturin-action@v1
45+
with:
46+
target: ${{ matrix.platform.target }}
47+
args: --release --out dist --find-interpreter
48+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
49+
manylinux: auto
50+
- name: Upload wheels
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: wheels-linux-${{ matrix.platform.target }}
54+
path: dist
55+
56+
musllinux:
57+
runs-on: ${{ matrix.platform.runner }}
58+
strategy:
59+
matrix:
60+
platform:
61+
- runner: ubuntu-22.04
62+
target: x86_64
63+
- runner: ubuntu-22.04
64+
target: x86
65+
- runner: ubuntu-22.04
66+
target: aarch64
67+
- runner: ubuntu-22.04
68+
target: armv7
69+
steps:
70+
- uses: actions/checkout@v4
71+
- uses: actions/setup-python@v5
72+
with:
73+
python-version: 3.x
74+
- name: Build wheels
75+
uses: PyO3/maturin-action@v1
76+
with:
77+
target: ${{ matrix.platform.target }}
78+
args: --release --out dist --find-interpreter
79+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
80+
manylinux: musllinux_1_2
81+
- name: Upload wheels
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: wheels-musllinux-${{ matrix.platform.target }}
85+
path: dist
86+
87+
windows:
88+
runs-on: ${{ matrix.platform.runner }}
89+
strategy:
90+
matrix:
91+
platform:
92+
- runner: windows-latest
93+
target: x64
94+
- runner: windows-latest
95+
target: x86
96+
steps:
97+
- uses: actions/checkout@v4
98+
- uses: actions/setup-python@v5
99+
with:
100+
python-version: 3.x
101+
architecture: ${{ matrix.platform.target }}
102+
- name: Build wheels
103+
uses: PyO3/maturin-action@v1
104+
with:
105+
target: ${{ matrix.platform.target }}
106+
args: --release --out dist --find-interpreter
107+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
108+
- name: Upload wheels
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: wheels-windows-${{ matrix.platform.target }}
112+
path: dist
113+
114+
macos:
115+
runs-on: ${{ matrix.platform.runner }}
116+
strategy:
117+
matrix:
118+
platform:
119+
- runner: macos-13
120+
target: x86_64
121+
- runner: macos-14
122+
target: aarch64
123+
steps:
124+
- uses: actions/checkout@v4
125+
- uses: actions/setup-python@v5
126+
with:
127+
python-version: 3.x
128+
- name: Build wheels
129+
uses: PyO3/maturin-action@v1
130+
with:
131+
target: ${{ matrix.platform.target }}
132+
args: --release --out dist --find-interpreter
133+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
134+
- name: Upload wheels
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: wheels-macos-${{ matrix.platform.target }}
138+
path: dist
139+
140+
sdist:
141+
runs-on: ubuntu-latest
142+
steps:
143+
- uses: actions/checkout@v4
144+
- name: Build sdist
145+
uses: PyO3/maturin-action@v1
146+
with:
147+
command: sdist
148+
args: --out dist
149+
- name: Upload sdist
150+
uses: actions/upload-artifact@v4
151+
with:
152+
name: wheels-sdist
153+
path: dist
154+
155+
release:
156+
name: Release
157+
runs-on: ubuntu-latest
158+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
159+
needs: [linux, musllinux, windows, macos, sdist]
160+
permissions:
161+
# Use to sign the release artifacts
162+
id-token: write
163+
# Used to upload release artifacts
164+
contents: write
165+
# Used to generate artifact attestation
166+
attestations: write
167+
steps:
168+
- uses: actions/download-artifact@v4
169+
- name: Generate artifact attestation
170+
uses: actions/attest-build-provenance@v2
171+
with:
172+
subject-path: 'wheels-*/*'
173+
- name: Publish to PyPI
174+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
175+
uses: PyO3/maturin-action@v1
176+
env:
177+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
178+
with:
179+
command: upload
180+
args: --non-interactive --skip-existing wheels-*/*

.github/workflows/jingle_sleigh.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ name: jingle_sleigh
66

77
on:
88
push:
9+
branches:
10+
- main
11+
tags:
12+
- '*'
913
pull_request:
1014
workflow_dispatch:
1115

.github/workflows/style.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Style
22

33
on:
44
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
59
pull_request:
610
workflow_dispatch:
711

jingle_python/script.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import z3
2+
from z3 import simplify
23
from jingle import *
3-
sleigh = create_sleigh_context("/Users/maroed/RustroverProjects/code_reuse_synthesis_artifacts/crackers/libz.so.1", "/Applications/ghidra")
4+
sleigh = create_sleigh_context("/Users/denhomc1/PycharmProjects/code_reuse_synthesis_artifacts/crackers/libz.so.1", "/Applications/ghidra")
45

56

67
jingle = sleigh.make_jingle_context()
78
model = jingle.model_block_at(0xa860, 9)
8-
for output in model.get_input_bvs():
9-
print(z3.simplify(output))
9+
print(simplify(model.final_state.register("RSP") == model.original_state.register("RSP")))
10+
print(simplify(model.final_state.register("RAX") == model.original_state.register("RAX")))
11+
print(simplify(model.final_state.register("RBX") == model.original_state.register("RBX")))

0 commit comments

Comments
 (0)