-
Notifications
You must be signed in to change notification settings - Fork 50
50 lines (41 loc) · 1.75 KB
/
performance_test.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
name: Performance Tests
on:
workflow_dispatch:
merge_group:
pull_request:
branches: [ main ]
env:
BUILD_TYPE: Debug
jobs:
performance_test:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install compiler
run: sudo apt update && sudo apt-get install -y clang-14
- name: Configure CMake
env:
CC: "/usr/lib/llvm-14/bin/clang"
CXX: "/usr/lib/llvm-14/bin/clang++"
CXX_STANDARD: 20
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
id: build_step
shell: bash
run: |
# interesting summary data on stderr
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t compilation_benchmark 2>&1 | tee ${{github.workspace}}/build/compilation_output.log
FRONT_END_TIME=$(grep "Clang front-end timer" ${{github.workspace}}/build/compilation_output.log | awk '{print $1}')
# generate summary with expandable section
echo "<details>" >> $GITHUB_STEP_SUMMARY
echo " <summary>Clang front-end: ${FRONT_END_TIME} seconds</summary>" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo " \`\`\`" >> $GITHUB_STEP_SUMMARY
cat ${{github.workspace}}/build/compilation_output.log >> $GITHUB_STEP_SUMMARY
echo " \`\`\`" >> $GITHUB_STEP_SUMMARY
echo "</details>" >> $GITHUB_STEP_SUMMARY
- name: 'Upload Compilation Trace'
uses: actions/upload-artifact@v3
with:
name: compilation_trace.json
path: ${{github.workspace}}/build/benchmark/CMakeFiles/compilation_benchmark.dir/big_nexus.cpp.json