-
Notifications
You must be signed in to change notification settings - Fork 42
53 lines (44 loc) · 1.48 KB
/
bench.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
name: Run benchmark and upload results
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
bench:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Get version
id: version
shell: bash
run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')"
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Set up Node.js for benching
uses: actions/setup-node@master
with:
node-version: 16.x
- name: Set up Node.js module
working-directory: ./minify-html-nodejs
run: npm install
- name: Build bench
working-directory: ./bench
run: |
./build
- name: Set up Backblaze B2 CLI
uses: wilsonzlin/setup-b2@v3
- name: Run bench and upload results
working-directory: ./bench
run: |
b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }}
./run
node graph.js
b2 sync ./graphs/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/js/
MHB_HTML_ONLY=1 ./run
node graph.js
b2 sync ./graphs/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/core/