Also run and upload HTML-only bench
This commit is contained in:
parent
e76c12a9db
commit
2d20698e46
|
@ -12,48 +12,59 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
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 Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.14.0'
|
||||
|
||||
- name: Set up Node.js for generating code
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
||||
- name: Run prebuild steps
|
||||
shell: bash
|
||||
run: bash ./prebuild.sh
|
||||
|
||||
- name: Set up Node.js for benching
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 10.x
|
||||
|
||||
- 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
|
||||
- name: Run bench and graph results
|
||||
working-directory: ./bench
|
||||
run: ./bench.sh
|
||||
|
||||
- name: Install B2 CLI
|
||||
run: |
|
||||
sudo pip install setuptools
|
||||
sudo pip install --upgrade b2
|
||||
- name: Upload to B2
|
||||
|
||||
- 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 }}
|
||||
b2 sync ./bench/results/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/
|
||||
./bench.sh
|
||||
b2 sync ./bench/results/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/js/
|
||||
HTML_ONLY=1 ./bench.sh
|
||||
b2 sync ./bench/results/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/core/
|
||||
|
|
|
@ -11,7 +11,7 @@ An HTML minifier meticulously optimised for both speed and effectiveness, availa
|
|||
|
||||
Comparison with [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
|
||||
|
||||
<img width="415" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.0/average-speeds.png"> <img width="415" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.0/average-sizes.png">
|
||||
<img width="415" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.0/js/average-speeds.png"> <img width="415" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.0/js/average-sizes.png">
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ For more information on how the tests are fetched, see [fetch.js](./fetch.js).
|
|||
|
||||
On this [project's README](../README.md), average graphs are shown. Graphs showing per-test results are shown below:
|
||||
|
||||
<img width="435" alt="Chart showing speed of HTML minifiers per test" src="https://wilsonl.in/minify-html/bench/0.3.0/speeds.png"> <img width="435" alt="Chart showing effectiveness of HTML minifiers per test" src="https://wilsonl.in/minify-html/bench/0.3.0/sizes.png">
|
||||
<img width="435" alt="Chart showing speed of HTML minifiers per test" src="https://wilsonl.in/minify-html/bench/0.3.0/js/speeds.png"> <img width="435" alt="Chart showing effectiveness of HTML minifiers per test" src="https://wilsonl.in/minify-html/bench/0.3.0/js/sizes.png">
|
||||
|
||||
Since speed depends on the input, speed charts show performance relative to the Node.js minify-html as a percentage.
|
||||
|
||||
|
|
Loading…
Reference in New Issue