From 13cff5d3378379bd51328f9039b77c70e56da232 Mon Sep 17 00:00:00 2001 From: "ondrej@mirtes.cz" Date: Sat, 14 Nov 2026 07:58:56 +0000 Subject: [PATCH] Install Tally from its release branch, which brings CodSpeed's Valgrind release/1.x of phpstan/tally commits its build of CodSpeed's Valgrind fork and its tally_hooks extension for every supported PHP version, so the Benchmarks workflow no longer installs the CodSpeed CLI, builds instrument-hooks, or enables FFI. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d73a-bab0-7223-9245-50c2c00f22c7 --- .github/workflows/benchmarks.yml | 30 ++---------------------------- composer.json | 2 +- composer.lock | 20 ++++++++------------ 3 files changed, 11 insertions(+), 41 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index fc792a1630c..220c7687a8a 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -29,13 +29,6 @@ concurrency: permissions: contents: read -env: - CODSPEED_VERSION: "5.6.3" - # of codspeed-runner-x86_64-unknown-linux-musl.tar.gz in that release - CODSPEED_SHA256: "f29532a5cbcb3462bc5d6bcf5570ddb8c8cbfffed579cb48c35d3910ed5f7f00" - # Tally calls it over FFI to count only the benchmark, not the warm-up before it - INSTRUMENT_HOOKS_COMMIT: "8fd5b878499f819561b33219cdafaa6f8c28b4e4" - jobs: run: name: "Benchmarks shard ${{ matrix.shard }}" @@ -66,33 +59,14 @@ jobs: with: coverage: "none" php-version: "8.5" - extensions: ds,ffi,mbstring,posix + extensions: ds,mbstring,posix ini-file: production ini-values: memory_limit=-1 - uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # v4.0.0 - - name: "Install CodSpeed" - run: | - mkdir -p "$RUNNER_TEMP/codspeed" - cd "$RUNNER_TEMP/codspeed" - curl -fsSLO "https://github.com/CodSpeedHQ/codspeed/releases/download/v${CODSPEED_VERSION}/codspeed-runner-x86_64-unknown-linux-musl.tar.gz" - echo "${CODSPEED_SHA256} codspeed-runner-x86_64-unknown-linux-musl.tar.gz" | sha256sum -c - - tar xzf codspeed-runner-x86_64-unknown-linux-musl.tar.gz --strip-components=1 codspeed-runner-x86_64-unknown-linux-musl/codspeed - echo "$RUNNER_TEMP/codspeed" >> "$GITHUB_PATH" - ./codspeed setup --mode=simulation - - - name: "Build CodSpeed's instrument-hooks" - run: | - git init -q "$RUNNER_TEMP/instrument-hooks" - cd "$RUNNER_TEMP/instrument-hooks" - git fetch -q --depth=1 https://github.com/CodSpeedHQ/instrument-hooks.git "$INSTRUMENT_HOOKS_COMMIT" - git checkout -q FETCH_HEAD - gcc -shared -fPIC -O2 -Iincludes -w dist/core.c -o libinstrument_hooks.so - + # Tally brings CodSpeed's Valgrind and its tally_hooks extension, nothing else to set up - name: "Run benchmarks" - env: - INSTRUMENT_HOOKS_LIBRARY: ${{ runner.temp }}/instrument-hooks/libinstrument_hooks.so # Valgrind runs each benchmark on one CPU, so the shard runs as many at once as the runner has run: "php vendor/bin/tally run --shard=${{ matrix.shard }}/${{ strategy.job-total }} --output=tmp/tally-results" diff --git a/composer.json b/composer.json index 71b5378f622..cce4687e096 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,7 @@ "phpstan/phpstan-nette": "^2.0", "phpstan/phpstan-phpunit": "^2.1", "phpstan/phpstan-strict-rules": "^2.1", - "phpstan/tally": "dev-main", + "phpstan/tally": "dev-release/1.x", "phpunit/phpunit": "^11.5.23", "shipmonk/composer-dependency-analyser": "^1.5", "shipmonk/dead-code-detector": "^1.4.2", diff --git a/composer.lock b/composer.lock index 11af18bbf31..d4cf2e7a9ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2903b076c8da1462199b1d569eefe18e", + "content-hash": "c8e816333f58f55b9348aa729f3d31a4", "packages": [ { "name": "clue/ndjson-react", @@ -4205,16 +4205,16 @@ }, { "name": "phpstan/tally", - "version": "dev-main", + "version": "dev-release/1.x", "source": { "type": "git", "url": "https://github.com/phpstan/tally.git", - "reference": "0a1ec271d83f1430607b9a6b36e1d619ff0928d6" + "reference": "983007834286c7970a8a88b9e5428832ff42a3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/tally/zipball/0a1ec271d83f1430607b9a6b36e1d619ff0928d6", - "reference": "0a1ec271d83f1430607b9a6b36e1d619ff0928d6", + "url": "https://api.github.com/repos/phpstan/tally/zipball/983007834286c7970a8a88b9e5428832ff42a3a0", + "reference": "983007834286c7970a8a88b9e5428832ff42a3a0", "shasum": "" }, "require": { @@ -4230,10 +4230,6 @@ "phpunit/phpunit": "^11.5 || ^12.5", "shipmonk/dead-code-detector": "^1.4" }, - "suggest": { - "ext-ffi": "To count instructions under CodSpeed's CPU simulation" - }, - "default-branch": true, "bin": [ "bin/tally" ], @@ -4255,10 +4251,10 @@ ], "support": { "issues": "https://github.com/phpstan/tally/issues", - "source": "https://github.com/phpstan/tally/tree/main" + "source": "https://github.com/phpstan/tally/tree/release/1.x" }, - "time": "2026-11-13T22:28:28+00:00", - "published-time": "2026-11-13T22:28:33+00:00" + "time": "2026-11-14T07:38:21+00:00", + "published-time": "2026-11-14T07:38:28+00:00" }, { "name": "phpunit/php-code-coverage",