Skip to content

version bump

version bump #166

Workflow file for this run

name: Benchmark
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
environment:
name: benchmarks
url: "https://jay3332.github.io/ril/benchmark/index.html"
steps:
- uses: actions/checkout@v3
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Setup cache
uses: Swatinem/rust-cache@v1
- name: Install gnuplot and neofetch
run: sudo apt update && sudo apt install gnuplot neofetch
- name: Show system specs
run: neofetch --stdout
- name: Install cargo-criterion
uses: zbraniecki/cached-cargo-install@v0
with:
crate-name: cargo-criterion
- name: Install criterion-table
uses: zbraniecki/cached-cargo-install@v0
with:
crate-name: criterion-table
- name: Pull benchmarks data
run: git clone -b benchmarks https://github.com/jay3332/ril target/criterion
- name: Run benchmark
run: cargo criterion --all-features --message-format=json | criterion-table > BENCHMARKS.md
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: BENCHMARKS.md
path: BENCHMARKS.md
- name: Add output markdown to job summary
run: cat BENCHMARKS.md >> $GITHUB_STEP_SUMMARY
- name: Append benchmark webpage to job summary
run: echo "For more details, visit [https://jay3332.github.io/ril/benchmark/index.html](https://jay3332.github.io/ril/benchmark/index.html)" > $GITHUB_STEP_SUMMARY
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/criterion/reports
keep_files: true
destination_dir: benchmark
- name: Save data
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/criterion
keep_files: true
publish_branch: benchmarks
- name: Set output URL
run: echo "::set-output name=env_url::https://jay3332.github.io/ril/benchmark/index.html"