-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (61 loc) · 2.47 KB
/
ci.yaml
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
name: Benchmark tests
on:
push:
branches:
- main
workflow_dispatch:
permissions:
# deployments permission to GH-pages site
deployments: write
# contents permission to update GH-pages content
contents: write
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4.6.1
- name: Install Python dependencies
run: |
python -m pip install -r requirements.txt
- name: Run benchmark
run: |
UNIQUE_ID=${GITHUB_EVENT_NAME}_${GITHUB_RUN_NUMBER}_${GITHUB_SHA} >> $GITHUB_ENV
python benchmark.py --pyis --stats --output_dir outputs/ --output_name ${UNIQUE_ID} -n 250
# Writing benchmarks to move to deployment/target repo
# python write_json_data.py ${{ github.workspace }}/outputs/${UNIQUE_ID}.json ${{ github.workspace }}/benchmark_records/new_record.json
# - name: Push benchmark result to pages
# 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: ${{ github.workspace }}/benchmark_records/new_record.json
# # Access token to deploy to GH-pages branch
# github-token: ${{ secrets.GITHUB_TOKEN }}
# # gh-pages branch name
# gh-pages-branch: gh-pages
# # directory on gh-pages branch to place benchmark dashboard page
# benchmark-data-dir-path: ./benchmarking
# # Workflow will fail when an alert happens
# fail-on-alert: true
# # Push and deploy automatically
# auto-push: true
- name: Push profiling results to pages
uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{ secrets.TARGET_ACCESS_TOKEN }}
with:
source_file: 'outputs'
destination_repo: 'willGraham01/benchmark-action-playtest-target'
destination_folder: '.'
destination_branch: 'target'
user_email: ccaegra@ucl.ac.uk
user_name: willGraham01
- name: Trigger website rebuild
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.TARGET_ACCESS_TOKEN }}
repository: willGraham01/benchmark-action-playtest-target
event-type: new-profiling-results