-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.58 KB
/
z3_trace_log_gen.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
name: Z3 Trace Log Generator
on:
push:
branches: [ "main" ]
paths:
- '**/*.smt2'
workflow_dispatch:
jobs:
generate_log:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Z3
uses: pavpanchekha/[email protected]
with:
version: "4.8.7"
- name: Determine New SMT2 Files
id: find_new_smt2
run: |
echo "New SMT2 files:"
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.smt2$' || true
echo "::set-output name=new_smt2_files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.smt2$' || true)"
- name: Run Z3 Solver
id: run_z3_and_upload
run: |
mkdir logs
for file in ${{ steps.find_new_smt2.outputs.new_smt2_files }}; do
echo "Processing $file"
# Run Z3 solver here for $file
# z3 trace=true proof=true trace-file-name=${file%.smt2}.log ./$file
# gzip -c ${file%.smt2} > logs
# Get the filename without extension
base_name=$(basename "${file%.*}")
# Compress the file and save it to logs directory
gzip -c "$file" > "$logs/${base_name}.log.gz"
echo "Compressed $file and saved to $logs/${base_name}.log.gz"
done
echo "::set-output name=logs_path::$(realpath logs)"
- name: Upload Build Artifacts
uses: actions/[email protected]
with:
name: z3_trace_logs
path: ${{ steps.run_z3_and_upload.outputs.logs_path }}