350230cd07
Bumps the github-actions group with 9 updates: | Package | From | To | | --- | --- | --- | | [actions/setup-python](https://github.com/actions/setup-python) | `6.2.0` | `6.3.0` | | [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.82.1` | `2.82.5` | | [actions/cache](https://github.com/actions/cache) | `5.0.5` | `6.1.0` | | [actions/setup-go](https://github.com/actions/setup-go) | `6.4.0` | `6.5.0` | | [r-lib/actions/setup-r](https://github.com/r-lib/actions) | `2.12.0` | `2.12.1` | | [r-lib/actions/setup-r-dependencies](https://github.com/r-lib/actions) | `2.12.0` | `2.12.1` | | [actions/setup-java](https://github.com/actions/setup-java) | `5.3.0` | `5.4.0` | | [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) | `4.1.0` | `4.1.1` | | [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.6` | `0.5.7` | Updates `actions/setup-python` from 6.2.0 to 6.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/a309ff8b426b58ec0e2a45f0f869d46889d02405...ece7cb06caefa5fff74198d8649806c4678c61a1) Updates `taiki-e/install-action` from 2.82.1 to 2.82.5 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/8b3c737da4b541bf0fb5a3e0488ff20535badac9...bffeee26d4db9be238a4ea78d8826604ebcb594d) Updates `actions/cache` from 5.0.5 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/27d5ce7f107fe9357f9df03efb73ab90386fccae...55cc8345863c7cc4c66a329aec7e433d2d1c52a9) Updates `actions/setup-go` from 6.4.0 to 6.5.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/4a3601121dd01d1626a1e23e37211e3254c1c06c...924ae3a1cded613372ab5595356fb5720e22ba16) Updates `r-lib/actions/setup-r` from 2.12.0 to 2.12.1 - [Release notes](https://github.com/r-lib/actions/releases) - [Changelog](https://github.com/r-lib/actions/blob/v2-branch/NEWS.md) - [Commits](https://github.com/r-lib/actions/compare/a51a8012b0aab7c32ef9d19bf54da93f3254335e...d3c5be51b12e724e68f33216ca3c148b66d5f0b6) Updates `r-lib/actions/setup-r-dependencies` from 2.12.0 to 2.12.1 - [Release notes](https://github.com/r-lib/actions/releases) - [Changelog](https://github.com/r-lib/actions/blob/v2-branch/NEWS.md) - [Commits](https://github.com/r-lib/actions/compare/a51a8012b0aab7c32ef9d19bf54da93f3254335e...d3c5be51b12e724e68f33216ca3c148b66d5f0b6) Updates `actions/setup-java` from 5.3.0 to 5.4.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/ad2b38190b15e4d6bdf0c97fb4fca8412226d287...1bcf9fb12cf4aa7d266a90ae39939e61372fe520) Updates `actions/attest-build-provenance` from 4.1.0 to 4.1.1 - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](https://github.com/actions/attest-build-provenance/compare/a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32...0f67c3f4856b2e3261c31976d6725780e5e4c373) Updates `zizmorcore/zizmor-action` from 0.5.6 to 0.5.7 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](https://github.com/zizmorcore/zizmor-action/compare/5f14fd08f7cf1cb1609c1e344975f152c7ee938d...192e21d79ab29983730a13d1382995c2307fbcaa) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: taiki-e/install-action dependency-version: 2.82.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/cache dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-go dependency-version: 6.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: r-lib/actions/setup-r dependency-version: 2.12.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: r-lib/actions/setup-r-dependencies dependency-version: 2.12.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-java dependency-version: 5.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/attest-build-provenance dependency-version: 4.1.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: zizmorcore/zizmor-action dependency-version: 0.5.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
146 lines
5.6 KiB
YAML
146 lines
5.6 KiB
YAML
name: Cross-library benchmark
|
||
|
||
# Audit finding R10: previously the cross-library benchmark ran on every push
|
||
# and every pull-request to `main`, adding 5–10 minutes of build + bench time
|
||
# per CI run with no consumer of the resulting artefact. The benchmark is now
|
||
# scheduled (nightly at 03:00 UTC) and on-demand via `workflow_dispatch`. The
|
||
# CI pipeline proper (.github/workflows/ci.yml) still verifies build / tests /
|
||
# lints on every push and pull-request.
|
||
on:
|
||
schedule:
|
||
# Nightly at 03:00 UTC. Pick a slot well away from common European /
|
||
# American working-hours pushes to keep this off the critical path.
|
||
- cron: "0 3 * * *"
|
||
workflow_dispatch:
|
||
inputs:
|
||
size:
|
||
description: "Number of bars per indicator (default 20000)"
|
||
required: false
|
||
default: "20000"
|
||
iterations:
|
||
description: "Batch iterations per indicator (default 10)"
|
||
required: false
|
||
default: "10"
|
||
|
||
# Least-privilege default for the auto-injected GITHUB_TOKEN. The single job
|
||
# only builds and uploads an artifact (upload-artifact uses the artifact
|
||
# storage API, not the contents scope), so it never needs repo write (OpenSSF
|
||
# Scorecard: Token-Permissions).
|
||
permissions:
|
||
contents: read
|
||
|
||
env:
|
||
CARGO_TERM_COLOR: always
|
||
# Network-flake resilience: retry transient registry/DNS failures at the tool
|
||
# level so a blip fetching crates.io / PyPI inside any build step (cargo,
|
||
# maturin, pip) retries automatically instead of failing the job. Cargo treats
|
||
# "couldn't resolve host" / connect / timeout as spurious and retries with
|
||
# backoff; 10 attempts ride out a transient DNS blip on a runner.
|
||
CARGO_NET_RETRY: "10"
|
||
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
|
||
npm_config_fetch_retries: "5"
|
||
npm_config_fetch_retry_maxtimeout: "120000"
|
||
PIP_RETRIES: "5"
|
||
PIP_DEFAULT_TIMEOUT: "120"
|
||
|
||
jobs:
|
||
cross-library-bench:
|
||
name: Cross-library benchmark report
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- uses: ./.github/actions/setup-rust
|
||
|
||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||
continue-on-error: true # cache is an optimisation; never block on a stuck/slow restore
|
||
timeout-minutes: 6
|
||
|
||
- name: Set up Python
|
||
id: setup_python
|
||
continue-on-error: true
|
||
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||
with:
|
||
python-version: "3.11"
|
||
cache: pip
|
||
cache-dependency-path: .github/requirements/bench.txt
|
||
|
||
- name: Wait before Python retry
|
||
if: steps.setup_python.outcome == 'failure'
|
||
shell: bash
|
||
run: |
|
||
echo "::warning::setup-python failed (likely CDN flake), waiting 30s before retry..."
|
||
sleep 30
|
||
|
||
- name: Set up Python (retry)
|
||
if: steps.setup_python.outcome == 'failure'
|
||
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||
with:
|
||
python-version: "3.11"
|
||
cache: pip
|
||
cache-dependency-path: .github/requirements/bench.txt
|
||
|
||
- name: Install Python deps + peer libs
|
||
run: |
|
||
python -m pip install --upgrade pip
|
||
# Hash-locked deps (OpenSSF Scorecard PinnedDependencies). bench.yml
|
||
# runs on a single Python version (3.11), so one lock file suffices.
|
||
python -m pip install --require-hashes -r .github/requirements/bench.txt
|
||
|
||
- name: Build Wickra wheel
|
||
working-directory: bindings/python
|
||
run: maturin build --release --out dist
|
||
|
||
- name: Install Wickra wheel
|
||
working-directory: bindings/python
|
||
run: python -m pip install --find-links dist --force-reinstall wickra
|
||
|
||
- name: Run cross-library benchmark
|
||
working-directory: bindings/python
|
||
# workflow_dispatch inputs are untrusted; pass them through the
|
||
# environment and quote them rather than interpolating into the shell
|
||
# command (OpenSSF Scorecard: Dangerous-Workflow).
|
||
env:
|
||
BENCH_SIZE: ${{ github.event.inputs.size || '20000' }}
|
||
BENCH_ITERATIONS: ${{ github.event.inputs.iterations || '10' }}
|
||
run: |
|
||
python -m benchmarks.compare_libraries \
|
||
--size "$BENCH_SIZE" \
|
||
--iterations "$BENCH_ITERATIONS" \
|
||
--streaming-window 5000 --streaming-iterations 2 \
|
||
| tee benchmark.txt
|
||
|
||
- name: Upload report
|
||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||
with:
|
||
name: cross-library-bench
|
||
path: bindings/python/benchmark.txt
|
||
|
||
rust-cross-bench:
|
||
name: Rust cross-library benchmark report
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- uses: ./.github/actions/setup-rust
|
||
|
||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||
continue-on-error: true # cache is an optimisation; never block on a stuck/slow restore
|
||
timeout-minutes: 6
|
||
|
||
# Wickra vs the other Rust TA crates (kand, ta-rs, yata) on an identical
|
||
# candle series — the like-for-like engine comparison with no binding
|
||
# overhead. Streaming + batch, in crates/wickra-bench/benches/cross_lib.rs.
|
||
- name: Run Rust cross-library benchmark
|
||
run: cargo bench -p wickra-bench --bench cross_lib | tee rust_cross_bench.txt
|
||
|
||
- name: Upload Rust report
|
||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||
with:
|
||
name: rust-cross-bench
|
||
path: rust_cross_bench.txt
|