-
Notifications
You must be signed in to change notification settings - Fork 1
131 lines (114 loc) · 4.76 KB
/
bench-all.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Benchmark using all datasets
on:
workflow_call:
secrets:
GH_TOKEN:
inputs:
releaseTag:
required: false
description: "Release tag for the benchmark results"
# default: "latest"
default: "CI"
type: string
workflow_dispatch:
inputs:
releaseTag:
required: false
description: "Release tag for the benchmark results"
# default: "latest"
default: "CI"
type: string
jobs:
bench_all:
name: Benchmark using all datasets
strategy:
# fail-fast: false
fail-fast: true
matrix:
benchScriptSet: ["stub", "stub-fast", "normal", "large", "coauthorship"]
# benchScriptSet: ["stub", "stub-fast"]
uses: tddschn/easygraph-bench/.github/workflows/bench.yaml@master
with:
benchScriptSet: "${{ matrix.benchScriptSet }}"
# runs-on
# python-version
# timeout
# cpp-binding-framework
# releaseTag
uploadResultsAsArtifact: true
releaseResults: false
merge_and_release:
name: Merge bench results and create release
runs-on: ubuntu-latest
needs: bench_all
steps:
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Checkout easygraph-bench
uses: actions/checkout@v3
with:
repository: tddschn/easygraph-bench
- name: Install dependencies for easygraph-bench
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Download result artifacts
uses: actions/download-artifact@v3
with:
path: bench-results
- name: Check downloaded artifacts
working-directory: bench-results
shell: bash
run: |
pwd
ls -lh ./**/*.csv
tail -n +1 ./**/*.csv
- name: Setup tmate session
# https://github.com/mxschmitt/action-tmate
# Only on failure
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
with:
# timeout-minutes: 15
# By default the tmate session will remain open until the workflow times out. You can specify your own timeout in minutes if you wish to reduce GitHub Actions usage.
limit-access-to-actor: true
# Use registered public SSH key(s)
# By default anybody can connect to the tmate session. You can opt-in to install the public SSH keys that you have registered with your GitHub profile.
# tmate-server-host: ssh.tmate.io
# tmate-server-port: 22
# tmate-server-rsa-fingerprint: SHA256:Hthk2T/M/Ivqfk1YYUn5ijC2Att3+UPzD7Rn72P5VWs
# tmate-server-ed25519-fingerprint: SHA256:jfttvoypkHiQYUqUCwKeqd9d1fJj/ZiQlFOHVl6E9sI
# Use your own tmate servers
# By default the tmate session uses ssh.tmate.io. You can use your own tmate servers. tmate-ssh-server is the server side part of tmate.
# install-dependencies: false
# Skip installing tmate
# By default, tmate and its dependencies are installed in a platform-dependent manner. When using self-hosted agents, this can become unnecessary or can even break. You can skip installing tmate and its dependencies using install-dependencies:
# Continue a workflow
# If you want to continue a workflow and you are inside a tmate session, just create a empty file with the name continue either in the root directory or in the project directory by running touch continue or sudo touch /continue.
- name: Process individual benchmarking result csv files
run: |
python3 ./merge_bench_csv.py -c bench-results > merged.csv
python3 add_graph_info_and_order_tool_to_csv.py merged.csv -A > all.csv
python3 add_graph_info_and_order_tool_to_csv.py merged.csv > all-with-graph-info.csv
python3 add_graph_info_and_order_tool_to_csv.py merged.csv -A -a > all-abbr.csv
python3 add_graph_info_and_order_tool_to_csv.py merged.csv -a > all-abbr-with-graph-info.csv
- name: Create release
shell: bash
env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GH_TOKEN: "${{ github.token }}"
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TAG: "${{ inputs.releaseTag }}"
REPO: ${{ github.repository }}
run: |
DATE_STR="$(date +"%Y-%m-%dT%H:%M:%S:%z")"
CSV_ZIP_FILENAME="bench-results-csv-${DATE_STR}.zip"
mv ./all*.csv bench-results
zip -r "${CSV_ZIP_FILENAME}" bench-results
set +e
# don't exit on error
gh release -R "${REPO}" create "${TAG}" --notes "Release from GitHub Actions"
set -e
gh release -R "${REPO}" upload "${TAG}" "${CSV_ZIP_FILENAME}"