-
Notifications
You must be signed in to change notification settings - Fork 7
130 lines (117 loc) · 4.28 KB
/
benchmarks.yml
File metadata and controls
130 lines (117 loc) · 4.28 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Benchmarks
on:
push:
branches: [main]
paths:
- 'src/**'
- 'benchmark/**'
pull_request:
paths:
- 'src/**'
- 'benchmark/**'
- '.github/workflows/benchmarks.yml'
workflow_dispatch: # Allow manual triggering
jobs:
benchmark:
name: Performance Benchmarks
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: '1'
arch: x64
- name: Cache Julia packages
uses: actions/cache@v5
with:
path: |
~/.julia/artifacts
~/.julia/packages
~/.julia/compiled
key: ${{ runner.os }}-julia-benchmark-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
restore-keys: |
${{ runner.os }}-julia-benchmark-
${{ runner.os }}-julia-
- name: Setup benchmark environments
run: |
# Setup FFTA environment
echo "Setting up FFTA environment..."
julia --color=yes --project=benchmark/ffta_env -e '
import Pkg
Pkg.develop(path=".")
Pkg.instantiate()
Pkg.precompile()
'
# Setup FFTW environment
echo "Setting up FFTW environment..."
julia --color=yes --project=benchmark/fftw_env -e '
import Pkg
Pkg.instantiate()
Pkg.precompile()
'
# Setup plotting environment
echo "Setting up plotting environment..."
julia --color=yes --project=benchmark -e '
import Pkg
Pkg.instantiate()
Pkg.precompile()
'
- name: Run benchmarks
id: run_benchmarks
run: |
cd benchmark
set -o pipefail
julia --project=. run_benchmarks.jl 2>&1 | tee benchmark_log.txt
- name: Check benchmark results
id: check_results
if: success()
run: |
if [ -f "benchmark/results_ffta.json" ] && [ -f "benchmark/results_fftw.json" ]; then
echo "results_exist=true" >> $GITHUB_OUTPUT
echo "✅ Benchmark results generated successfully"
else
echo "results_exist=false" >> $GITHUB_OUTPUT
echo "❌ Benchmark results not found"
exit 1
fi
if [ -f "benchmark/benchmark_report.html" ]; then
echo "html_exists=true" >> $GITHUB_OUTPUT
echo "✅ HTML report generated successfully"
else
echo "html_exists=false" >> $GITHUB_OUTPUT
echo "⚠️ HTML report not found"
exit 1
fi
- name: Upload benchmark results
uses: actions/upload-artifact@v7
if: always()
with:
name: benchmark-results-${{ github.run_id }}
path: |
benchmark/benchmark_report.html
benchmark/*.json
benchmark/benchmark_log.txt
retention-days: 30
if-no-files-found: warn
- name: Generate job summary
if: success()
run: |
echo "## 📊 Benchmark Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "✅ **Benchmarks completed successfully!**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Count total tests
FFTA_COUNT=$(grep -o '"size"' benchmark/results_ffta.json | wc -l)
echo "- Tested $FFTA_COUNT array sizes across 5 categories" >> $GITHUB_STEP_SUMMARY
echo "- Categories: Odd powers of 2, Even powers of 2, Powers of 3, Composite, Prime numbers" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📈 **Outputs generated:**" >> $GITHUB_STEP_SUMMARY
echo "- Interactive HTML report with embedded plots" >> $GITHUB_STEP_SUMMARY
echo "- Category-specific performance plots" >> $GITHUB_STEP_SUMMARY
echo "- Combined performance comparison plots" >> $GITHUB_STEP_SUMMARY
echo "- Raw JSON results for further analysis" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📦 **Artifacts:** Download benchmark results from the artifacts section above" >> $GITHUB_STEP_SUMMARY