2020-01-26 16:38:14 +13:00
name : Run benchmark and upload results
on :
2021-08-06 12:22:24 +10:00
push :
2020-01-26 16:38:14 +13:00
tags :
- 'v*'
2021-08-06 12:22:24 +10:00
workflow_dispatch :
2020-01-26 16:38:14 +13:00
jobs :
bench :
2021-04-06 18:50:24 +10:00
runs-on : ubuntu-18.04
2020-01-26 16:38:14 +13:00
steps :
- uses : actions/checkout@v1
2020-07-25 14:31:55 +10:00
2020-01-26 16:38:14 +13:00
- name : Get version
id : version
shell : bash
2020-06-19 13:00:25 +10:00
run : echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')"
2020-07-25 14:31:55 +10:00
2020-01-26 16:38:14 +13:00
- name : Set up Rust
uses : actions-rs/toolchain@v1
with :
2020-07-03 20:42:10 +10:00
toolchain : stable
2020-01-26 16:38:14 +13:00
profile : minimal
default : true
2020-07-25 14:31:55 +10:00
2020-07-11 23:25:36 +10:00
- name : Run prebuild steps
shell : bash
run : bash ./prebuild.sh
2020-07-25 14:31:55 +10:00
2020-06-19 18:33:04 +10:00
- name : Set up Node.js for benching
uses : actions/setup-node@master
with :
2021-08-08 11:17:32 +10:00
node-version : 16. x
2020-07-25 14:31:55 +10:00
2020-01-26 16:38:14 +13:00
- name : Set up Node.js module
working-directory : ./nodejs
2022-06-21 21:52:28 +10:00
run : npm install
2020-07-25 14:31:55 +10:00
2020-01-26 16:38:14 +13:00
- name : Build bench
working-directory : ./bench
run : |
2021-08-08 23:11:05 +10:00
./build
2020-07-25 14:31:55 +10:00
2020-11-13 22:15:51 +11:00
- name : Set up Backblaze B2 CLI
uses : wilsonzlin/setup-b2@v3
2020-07-25 14:31:55 +10:00
- name : Run bench and upload results
working-directory : ./bench
2020-06-19 09:49:48 +10:00
run : |
b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }}
2021-08-08 23:11:05 +10:00
./run
2021-08-09 00:08:30 +10:00
node graph.js
2021-08-08 23:11:05 +10:00
b2 sync ./graphs/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/js/
MHB_HTML_ONLY=1 ./run
2021-08-09 00:08:30 +10:00
node graph.js
2021-08-08 23:11:05 +10:00
b2 sync ./graphs/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/core/