Added new smt file #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |