-
Notifications
You must be signed in to change notification settings - Fork 9
76 lines (71 loc) · 2.22 KB
/
benchmark-validation.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
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
# Apache License 2.0
name: Benchmark and Validate
on:
workflow_call:
inputs:
project_name:
description: The name of the project.
required: true
type: string
project_version:
description: The version of the project.
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: true
DOCKERHUB_TOKEN:
required: true
env:
DOCKER_REGISTRY_PATH: openspacecollective
LANG: en_US.UTF-8
jobs:
benchmark-cpp:
name: Benchmark C++
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull Development Image
run: docker pull ${{ env.DOCKER_REGISTRY_PATH }}/${{ inputs.project_name }}-development:${{ inputs.project_version }}
- name: Run C++ Benchmark
run: make benchmark-cpp-standalone
- name: Download previous benchmark
uses: actions/cache@v3
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'googlecpp'
output-file-path: bin/benchmark_result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: ${{ github.ref == 'refs/heads/main' }}
alert-threshold: "200%"
comment-on-alert: true
validation-cpp:
name: Run C++ Validation Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull Development Image
run: docker pull ${{ env.DOCKER_REGISTRY_PATH }}/${{ inputs.project_name }}-development:${{ inputs.project_version }}
- name: Run C++ Validation Tests
run: make validation-cpp-standalone