-
Notifications
You must be signed in to change notification settings - Fork 89
68 lines (55 loc) · 2.01 KB
/
benchmark.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
name: Benchmarks
on:
workflow_dispatch:
push:
branches: [main, eran/ci/benchmark-tests]
jobs:
storage-benchmark:
runs-on: ubuntu-latest
permissions:
contents: "write"
id-token: "write"
steps:
- name: Checkout repository
uses: actions/checkout@v3
# - name: Set a unique run identifier
# run: echo "UNIQE_ID=${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GOOGLE_CI_SA_CREDENTIALS }}"
- id: "get-credentials"
name: Get GKE credentials
uses: "google-github-actions/get-gke-credentials@v1"
with:
cluster_name: "${{ secrets.GKE_CI_CLUSTER_NAME }}"
location: "${{ secrets.GKE_CI_CLUSTER_REGION }}"
- name: Run load test
run: sh -c "deployments/storage-benchmark/run_benchmark.bash 5m"
- name: Parse load test results
run: |
pwd
ls -al
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
# What benchmark tool the output.txt came from
tool: 'customSmallerIsBetter'
# Where the output from the benchmark tool is stored
output-file-path: output.txt
# Where the previous data file is stored
external-data-json-path: ./cache/benchmark-data.json
auto-push: false
# Push gh-pages branch by yourself
- name: Push benchmark result
run: git push 'https://you:${{ secrets.GITHUB_TOKEN }}@github.com/starkware-libs/papyrus.git' gh-pages:gh-pages
# - name: Clean the deployment
# if: always()
# run: helm delete --namespace papyrus papyrus-${UNIQE_ID}