Skip to content

A power of the secant beside a power of a + i a tan is integrated in … #3179

A power of the secant beside a power of a + i a tan is integrated in …

A power of the secant beside a power of a + i a tan is integrated in … #3179

Workflow file for this run

name: 'Kernel Benchmark'
# The path filters below used to read "./Sources/AngouriMath/AngouriMath", which is not a
# path in this tree: the kernel is Sources/AngouriMath/ and its project file is
# Sources/AngouriMath/AngouriMath.csproj, with no nested AngouriMath directory. The pattern
# has no wildcard, so it could only ever match that one literal non-existent path, and the
# workflow last ran on 2026-01-02 -- two minutes before the filter was re-added in f51c7e03.
# Ninety-eight PRs merged after that without being benchmarked.
#
# Path filters are globs matched against paths relative to the repository root, so the
# leading "./" was wrong as well, though it made no difference while the target did not
# exist. https://github.com/asc-community/AngouriMath/issues/775
on:
workflow_dispatch:
push:
branches:
- master
# Written out twice rather than shared through a YAML anchor: anchors are not a
# supported part of the workflow syntax, and a benchmark that fails to parse is a
# worse outcome than the one being fixed here.
paths:
- "Sources/AngouriMath/**"
# A change to the benchmark itself is worth benchmarking.
- "Sources/Tests/DotnetBenchmark/**"
# And so is a change to this file -- which is also what lets a fix to these filters
# demonstrate that it works, rather than being reasoned about.
- ".github/workflows/Benchmark.yml"
pull_request:
branches:
- '*'
paths:
- "Sources/AngouriMath/**"
- "Sources/Tests/DotnetBenchmark/**"
- ".github/workflows/Benchmark.yml"
jobs:
Benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
dotnet-quality: 'preview'
- name: 'Inter version CPU benchmark'
run: |
cd Sources/Tests/DotnetBenchmark
dotnet run -c Release CommonFunctionsInterVersion
- name: 'Inter version RAM benchmark'
run: |
cd Sources/Tests/DotnetBenchmark
dotnet run -c Release RAMUsageTest
# The step that makes the two above a gate rather than a report. It runs no benchmark:
# the CPU step wrote what it measured to benchmark_results.csv/measured-*.json, and this
# reads that against the committed performance-baseline.json. Allocation is what it fails
# on, in either direction; the wall clock is reported and only fails at 3x, because a
# GitHub-hosted runner shares its host and a tight time threshold would be red for
# reasons that are not the change. The argument, and the variance it was measured from,
# are in PerformanceGate.cs.
#
# Last, so that a failure here does not cost the RAM figures, and before the upload so
# that the file to copy over the baseline is in the artifact of the run that failed.
# https://github.com/asc-community/AngouriMath/issues/529
- name: 'Kernel performance gate'
run: |
cd Sources/Tests/DotnetBenchmark
dotnet run -c Release --no-build PerformanceGate
# The numbers used to exist only in this job's log, which expires -- so there was no way to
# see whether a figure had moved without re-running an old commit by hand. Retaining them is
# step 1 of https://github.com/asc-community/AngouriMath/issues/500, and the only step that
# can be taken from inside this repository: the two destinations that issue names,
# AngouriMathLab/performance-reports and AngouriMathLab/performance-reports-tools, do not
# exist.
#
# if: always() because a benchmark that fell over part way still produced numbers for the
# cases that ran, and those are the interesting ones when something has just broken.
- name: 'Retain the results'
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ github.sha }}
path: |
Sources/Tests/DotnetBenchmark/benchmark_results.csv/**
Sources/Tests/DotnetBenchmark/BenchmarkDotNet.Artifacts/**
if-no-files-found: warn
retention-days: 90