Skip to content

use utf8 by default to avoid basic encoding issues #412

use utf8 by default to avoid basic encoding issues

use utf8 by default to avoid basic encoding issues #412

Workflow file for this run

---
name: Benchmarks
on:
pull_request:
branches: ["master"]
env:
# Should speed up build. See
# https://matklad.github.io/2021/09/04/fast-rust-builds.html
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
benchmarks:
name: "Benchmarks"
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
env:
PYTHONFAULTHANDLER: "true"
steps:
- uses: "actions/checkout@v3"
with:
# We need tags to get the correct code version:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
activate-environment: benchmark
environment-file: benchmarks/conda-linux-64.lock
- uses: Swatinem/rust-cache@v2
- name: Benchmark
run: |
set -euo pipefail
ln -s $CONDA_PREFIX venv
make
make benchmark
echo "## Benchmark results" > benchmark.diff
echo '```diff' >> benchmark.diff
git diff --word-diff benchmarks/results/ >> benchmark.diff
echo '```' >> benchmark.diff
printf '{ "body": ' > benchmark.json
cat benchmark.diff | jq -R -s >> benchmark.json
printf '}' >> benchmark.json
cat benchmark.json
curl \
-X POST \
${{ github.event.pull_request.comments_url }} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--data @benchmark.json