minify-html/.github/workflows/bench.yaml

58 lines
1.7 KiB
YAML
Raw Normal View History

2020-01-25 22:38:14 -05:00
name: Run benchmark and upload results
on:
create:
tags:
- 'v*'
2020-06-18 21:06:22 -04:00
repository_dispatch:
types: [wf-bench]
2020-01-25 22:38:14 -05:00
jobs:
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get version
id: version
shell: bash
2020-06-18 23:00:25 -04:00
run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')"
2020-01-25 22:38:14 -05:00
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
2020-01-25 22:38:14 -05:00
profile: minimal
default: true
- name: Set up Node.js for generating code
uses: actions/setup-node@master
with:
node-version: 14.x
2020-06-19 04:27:46 -04:00
- name: Build generated code
working-directory: ./gen
run: |
npm install
2020-07-09 03:06:08 -04:00
bash ./gen.sh
- name: Set up Node.js for benching
uses: actions/setup-node@master
with:
node-version: 10.x
2020-01-25 22:38:14 -05:00
- name: Set up Node.js module
working-directory: ./nodejs
run: npm install
- name: Build bench
working-directory: ./bench
run: |
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
npm install
./build.sh
2020-01-25 22:38:14 -05:00
- name: Run bench and graph results
working-directory: ./bench
run: ./bench.sh
2020-06-18 19:49:48 -04:00
- name: Install B2 CLI
run: |
2020-06-18 20:38:08 -04:00
sudo pip install setuptools
sudo pip install --upgrade b2
2020-06-18 19:49:48 -04:00
- name: Upload to B2
run: |
b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }}
b2 sync ./bench/results/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/hyperbuild/bench/${{ steps.version.outputs.VERSION }}/