forked from CppMicroServices/CppMicroServices
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (68 loc) · 2.6 KB
/
performance_windows.yml
File metadata and controls
80 lines (68 loc) · 2.6 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
name: PerformanceWindows
on:
push:
#This workflow runs only on development branch
#If you want to run performance tests on a particular branch
#Please add your branch name in branches, e.g. branches: [ development, your_branch_name ]
branches: [ development ]
workflow_dispatch:
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
BUILD_CONFIGURATION: 0
WITH_COVERAGE: 0
jobs:
benchmark:
name: CppMicroServices Benchmarks [${{matrix.os}},Configuration=${{matrix.buildconfiguration}}]
runs-on: ${{matrix.os}}
env:
BUILD_DIR: Z:\build\config_${{matrix.buildconfiguration}}
BUILD_CONFIGURATION: ${{matrix.buildconfiguration}}
BUILD_OS: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-2022]
# build configurations:
# 0 = threading ON / shared lib ON
# 1 = threading ON / shared lib OFF
# 2 = threading OFF / shared lib ON
# 3 = threading OFF/ shared lib OFF
buildconfiguration: [0]
steps:
- name: Initialization
run: |
git config --global core.autocrlf true
subst Z: ${{github.workspace}}
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Test
working-directory: Z:\
run: ctest -VV -S cmake\usCTestScript_github.cmake
- name: Run benchmark and store result in json format
run: ${{ env.BUILD_DIR }}\bin\Release\usFrameworkBenchTests.exe --benchmark_format=json | tee ${{ env.BUILD_DIR }}\bin\Release\benchmark_result.json
- name: Upload Performance Results as Artifact
uses: actions/upload-artifact@v3
with:
name: Performance Results - ${{ github.event.head_commit.author.name }} - ${{ github.sha }}
path: ${{ env.BUILD_DIR }}\bin\Release\benchmark_result.json
- name: Deploy results
# Condition the step on the 'development' branch only
if: github.ref == 'refs/heads/development'
uses: benchmark-action/github-action-benchmark@v1.16.1
with:
name: C++ Benchmark
tool: 'googlecpp'
output-file-path: ${{ env.BUILD_DIR }}\bin\Release\benchmark_result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '20%'
comment-on-alert: true
fail-on-alert: false