Skip to content

Commit edcda9e

Browse files
authored
ci: benchmark workflow (#120)
finalizing benchmark workflow until feature of combining custom runner. this ci checks openfhe installation, if not install, install latest `dio` binary and run bench base on provided input on CI. After it upload log and memory analyzed file to github
1 parent 0a54d8a commit edcda9e

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,24 @@ jobs:
4848
sudo apt-get update
4949
sudo apt-get install -y build-essential cmake libgmp-dev libasound2-dev
5050
51+
- name: Check for OpenFHE
52+
id: openfhe-check
53+
run: |
54+
if ldconfig -p | grep -q 'libOpenFHE'; then
55+
echo "installed=true" >> $GITHUB_OUTPUT
56+
else
57+
echo "installed=false" >> $GITHUB_OUTPUT
58+
fi
59+
5160
- name: Checkout OpenFHE
61+
if: steps.openfhe-check.outputs.installed == 'false'
5262
uses: actions/checkout@v4
5363
with:
5464
repository: openfheorg/openfhe-development
5565
path: openfhe
5666

5767
- name: Build & install OpenFHE
68+
if: steps.openfhe-check.outputs.installed == 'false'
5869
run: |
5970
cd openfhe
6071
mkdir -p build && cd build
@@ -67,7 +78,6 @@ jobs:
6778
- name: Verify OpenFHE install
6879
run: ls -lah /usr/local/lib | grep OpenFHE
6980

70-
# ───────────────────────────────────────────────────────────────────────────
7181
- name: Install dio
7282
run: cargo install --path dio
7383

@@ -90,8 +100,31 @@ jobs:
90100
echo "Benchmark PID: $pid"
91101
wait $pid
92102
103+
- name: Install uv
104+
uses: astral-sh/setup-uv@v5
105+
106+
- name: Install the project
107+
run: uv sync --locked --all-extras --dev
108+
93109
- name: Upload benchmark logs
94110
uses: actions/upload-artifact@v4
95111
with:
96112
name: bench-logs
97113
path: logs/*.log
114+
115+
- name: Run memory profiling
116+
run: |
117+
LOG=logs/data_${{ github.event.inputs.data_id }}_param_${{ github.event.inputs.param_id }}.log
118+
uv run memory_profile.py --log-file "$LOG"
119+
120+
- name: Upload memory analysis
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: memory-analysis
124+
path: logs/combined_memory_analysis_*.txt
125+
126+
- name: Clean up logs
127+
if: always()
128+
run: rm -rf logs
129+
130+

0 commit comments

Comments
 (0)